qfedu-c-level/day4/homework/h9.c

14 lines
264 B
C
Raw Permalink Normal View History

2023-07-08 16:27:14 +08:00
// 请编程定义一个double类型的变量n和一个char类型的变量m,请计算它们的和并输出
#include <stdio.h>
int main()
{
double n = 2.3;
char m = 'a';
printf("a = %d\n", m);
printf("n + m = %.2lf\n", n + m);
return 0;
}