运算过程中数据类型的转换
#include <stdio.h>int main (void)
{
int a , b;
double c;
a =5 ,b=3;
c=a%b;
printf ("c=%d\n",c);
printf ("c=%f",c);
getchar ();
return 0;
}
运行结果:c=0
c=2.000000
#include <stdio.h>
int main (void)
{
int a , b ,c;
a =5 ,b=3;
c=a%b;
printf ("c=%d\n",c);
printf ("c=%f",c);
getchar ();
return 0;
}
运行结果:c=2
c=0.000000
想知道运算过程中数据类型的转换
拜谢