最新回答 / qq_棠梨煎雪故人来_03907185
这是递归的核心思想。例如阶乘,想计算5!,其实就等于5*4!,同样,可以继续分为5*4*3!,所以放在函数里,就是fact(5)=5*fact(4)
2021-12-25
#include <stdio.h>
int main()
{
float a,b,c;
a=1;
b=2;
c = a /b;
printf("c: %f\n", c);
return 0;
}
int main()
{
float a,b,c;
a=1;
b=2;
c = a /b;
printf("c: %f\n", c);
return 0;
}
#include <stdio.h>
int main()
{
printf("Hello World! This is C Style\n");
printf("Hello World! This is C++ Style\n");
return 0;
}
int main()
{
printf("Hello World! This is C Style\n");
printf("Hello World! This is C++ Style\n");
return 0;
}
最新回答 / QW_KK
在c++中printf()、scanf()、cout、cin都是支持的。具体使用那个看个人习惯。printf、scanf需要使用占位符进行预格式化。cout、cin写到哪算哪,不需要使用占位符。<...code...>
2021-10-16