C语⾔基础:简单的数学运算的代码
如下资料是关于C语⾔基础:简单的数学运算的内容。
#include <stdio.h>
int main ()
{
int seconds_in_an_hour;
float average;
average = (5 + 10 + 15 + 20) / 4;
printf(“The number of seconds in an hour %dn”,
seconds_in_an_hour);
printf(“The average of 5, 10, 15, and 20 is %fn”,
average);
printf(“The number of seconds in 48 minutes is %dn”,
return 1;
}
gcc编译运⾏输出结果
The number of seconds in an hour 3600基础c语言代码
The average of 5, 10, 15, and 20 is 12.000000
The number of seconds in 48 minutes is 2880

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。