有人會用Dev-c++寫程式嗎?
如下~
我找半天找不到問題
可否幫我解一下呀
是初學者 學校要交的作業~~~~
#include <stdio.h>
#include <stdlib.h>
int main()
{
int chinese;
int english;
int math;
int science;
int social;
int sum;
float average;
sum = chinese+english+math+science+social;
average = sum/5
scanf("%d%d%d%d%d",&chinese,&english,&math,&science,&social);
printf("各科成績\n");
printf("========================\n");
printf(" %d\n",chinese);
printf(" %d\n",english);
printf(" %d\n",math);
printf(" %d\n",science);
printf(" %d\n",social);
printf("========================\n");
printf(" %d\n",sum);
printf(" %.2f\n",average);
system("pause");
return 0;
}
我找半天找不到問題
可否幫我解一下呀
是初學者 學校要交的作業~~~~
#include <stdio.h>
#include <stdlib.h>
int main()
{
int chinese;
int english;
int math;
int science;
int social;
int sum;
float average;
sum = chinese+english+math+science+social;
average = sum/5
scanf("%d%d%d%d%d",&chinese,&english,&math,&science,&social);
printf("各科成績\n");
printf("========================\n");
printf(" %d\n",chinese);
printf(" %d\n",english);
printf(" %d\n",math);
printf(" %d\n",science);
printf(" %d\n",social);
printf("========================\n");
printf(" %d\n",sum);
printf(" %.2f\n",average);
system("pause");
return 0;
}