- #include<stdio.h>
- #include<stdlib.h>
- int main(void)
- {
- double a,b,c;
- char zx[]="",s[]="";//,s2[]="",s3[]="";
-
- print f("請輸入姓名:\n"); fgets(zx,20,stdin);
- print f("請輸入計概成績:\n"); fgets(s,10,stdin); a=atof(s);
- print f("請輸入數學成績:\n"); fgets(s,10,stdin); b=atof(s);
- print f("請輸入英文成績:\n"); fgets(s,10,stdin); c=atof(s);
- print f("統計中.....\n");
- print f("\t%s的成績如下:\n",zx);
- print f("==================\n");
- print f("\t計概:%3.f\n",a);
- print f("\t數學:%3.f\n",b);
- print f("\t英文:%3.f\n",c);
- print f("-------------------\n");
- print f("\t總分:%3.f\n",a+b+c);
- print f("\t平均:%3.2f\n",(a+b+c)/3);
- system("pause");
- return 0;
- }
複製代碼 我的問題是在他無法顯示正確的中文!... |