magnolia62

如下资料是关于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
The average of 5, 10, 15, and 20 is 12.000000
The number of seconds in 48 minutes is 2880





 

分类:

技术点:

相关文章:

  • 2021-04-20
  • 2022-12-23
  • 2021-12-30
  • 2021-10-22
  • 2022-12-23
  • 2022-03-03
  • 2021-12-05
  • 2021-07-27
猜你喜欢
  • 2021-08-26
  • 2021-12-05
  • 2022-12-23
  • 2022-01-01
  • 2021-11-28
  • 2022-12-23
相关资源
相似解决方案