question4の解答 | C言語を研究

C言語を研究

C言語を研究したいと思います 目次(ここを参考に♪)→http://ameblo.jp/c-program/themeentrylist-10062017572.html

#include<stdio.h>
main ( ) {
int japanese,history,sience;
int all,heikin;
printf("国語の点数=");
scanf("%d",&japanese);
printf("社会の点数=");
scanf("%d",&history);
printf("理科の点数=");
scanf("%d",&sience);
all = japanese + history +sience;
heikin = all / 3;
printf("合計は%d       平均は%dです。\n",all,heikin);
return 0;
}