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

14 lines
264 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 请编程定义一个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;
}