Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

§Ö±Ï§Ú!!!!!!!!c++

0 views
Skip to first unread message

現在.....(b)

unread,
Apr 16, 2002, 2:53:07 AM4/16/02
to
#include<stdio.h>
#include<conio.h>
main()
{
int a,n;
flag=0
printf("please input one:");
scanf("%d",&n);
for (a=1;a<=n;a++)
{
if (n%a==0& a==1 & a==n)
printf("yes");

else

printf("no");

}

此題目:辨斷輸入數字是否為質數......

*請幫我修改~~謝謝~~~^^
--
Origin: 台東高商 bbs.tscvs.ttct.edu.tw (203.71.3.3)

百年孤寂好看~

unread,
Apr 17, 2002, 5:22:05 AM4/17/02
to
※ 引述《chie...@bbs.tscvs.ttct.edu.tw (現在.....(b))》之銘言:
: #include<stdio.h>

: #include<conio.h>
: main()
: {
: int a,n;
: flag=0
: printf("please input one:");
: scanf("%d",&n);
: for (a=1;a<=n;a++)
: {
: if (n%a==0& a==1 & a==n)
: printf("yes");
: else
: printf("no");
: }
: 此題目:辨斷輸入數字是否為質數......
: *請幫我修改~~謝謝~~~^^
題外話....
這個程式跟c++有何關聯?
只有用到C的語法吧

--
[1;31mO [1;32mr [1;33mi [1;34mg [1;35mi [1;36mn [1;31m: [1;36m<不良牛牧場> [1;33mzoo.ee.ntu.edu.tw [1;32m(140.112.18.36) [m
[1;32mWelcome to SimFarm BBS [1;36m-- [m [1;31mFrom : [ [mpc04.r4218.cis.scu.edu.tw [1;31m] [m

0 new messages