精華區beta CSSE 關於我們 聯絡資訊
這是我自己寫的 不過沒有辦法像函式庫內的可以就直接結束掉 有哪位大大可以教我 把它改成一樣的作用 謝謝摟 以下是我的程式碼 #include<stdio.h> #include<conio.h> #include<string.h> int main() { char ch[1000]; int n,i; printf("please enter a string:\n"); printf("this is use getchar:"); n=strlen(ch); for(i=0;i<=n;i++){ ch[i]=getchar(); putchar(ch[i]); } return 0; } -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.123.224.111