#24104: 為甚麼錯


lazy47352361@gmail.com (sdfkg)


#include <stdio.h>

#include <stdlib.h>

 

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

 

int main(int argc, char *argv[]) {

char c[9999];

scanf("%s",c);

peintf("hello,%s\n",a); 

return 0;

}

#24106: Re:為甚麼錯


hsugoya@gmail.com (Мигает cf4?)


我是這樣解啦

不知道有沒由回答道你

 

#include<stdio.h>

int main()

{

    char string[100];

    while(scanf("%s",string)!=EOF)

    {

        printf("hello, ");

        printf("%s\n",string);      

    }

    return 0;   

}

 

#24107: Re:為甚麼錯


lazy47352361@gmail.com (sdfkg)


我是這樣解啦

不知道有沒由回答道你

 

#include

int main()

{

    char string[100];

    while(scanf("%s",string)!=EOF)

    {

        printf("hello, ");

        printf("%s\n",string);      

    }

    return 0;   

}

 

int main(int argc, char *argv[])

int main()

不好意思 這兩個有甚麼差別阿

#24112: Re:為甚麼錯


hsugoya@gmail.com (Мигает cf4?)


我是這樣解啦

不知道有沒由回答道你

 

#include

int main()

{

    char string[100];

    while(scanf("%s",string)!=EOF)

    {

        printf("hello, ");

        printf("%s\n",string);      

    }

    return 0;   

}

 

int main(int argc, char *argv[])

int main()

不好意思 這兩個有甚麼差別阿

 

while(scanf()!=EOF)

這句寫法是 , 只要scanf 還沒讀到 EOF ,  while迴圈內的程式就會被持續執行
#24113: Re:為甚麼錯


lazy47352361@gmail.com (sdfkg)


我是這樣解啦

不知道有沒由回答道你

 

#include

int main()

{

    char string[100];

    while(scanf("%s",string)!=EOF)

    {

        printf("hello, ");

        printf("%s\n",string);      

    }

    return 0;   

}

 

int main(int argc, char *argv[])

int main()

不好意思 這兩個有甚麼差別阿

 

while(scanf()!=EOF)

這句寫法是 , 只要scanf 還沒讀到 EOF ,  while迴圈內的程式就會被持續執行

不好意思 
我還是不懂上面這兩個的差別

int main(int argc, char *argv[])

 

int main()

 

#24114: Re:為甚麼錯


lazy47352361@gmail.com (sdfkg)


我是這樣解啦

不知道有沒由回答道你

 

#include

int main()

{

    char string[100];

    while(scanf("%s",string)!=EOF)

    {

        printf("hello, ");

        printf("%s\n",string);      

    }

    return 0;   

}

 

int main(int argc, char *argv[])

int main()

不好意思 這兩個有甚麼差別阿

 

while(scanf()!=EOF)

這句寫法是 , 只要scanf 還沒讀到 EOF ,  while迴圈內的程式就會被持續執行

不好意思 
我還是不懂上面這兩個的差別

int main(int argc, char *argv[])

 

int main()

 

c跟cpp有甚麼差別?

 

#24115: Re:為甚麼錯


hsugoya@gmail.com (Мигает cf4?)


https://blog.gtwang.org/programming/c-cpp-tutorial-argc-argv-read-command-line-arguments/

#24123: Re:為甚麼錯


kobe60116@gmail.com (xlonely_cat 孤貓)


#include

#include

 

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

 

int main(int argc, char *argv[]) {

char c[9999];

scanf("%s",c);

peintf("hello,%s\n",a); 

return 0;

}

need while

#24126: Re:為甚麼錯


90611 (操作員☑)


#include

#include

 

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

 

int main(int argc, char *argv[]) {

char c[9999];

scanf("%s",c);

peintf("hello,%s\n",a); 

return 0;

}

need while

讓我把你的瀏覽數刷到破萬吧!!