c語言乘法的函數(shù)怎么寫?
#include "stdio.h" #include "conio.h" //導(dǎo)入getch();函數(shù) main(){ printf("%d",step()); getch(); } int step(){ int i,n,j; i=1; j=1; scanf ("%d", &n); for (i=1;i<=n;i++){ j = j*i; } return j; } 改進(jìn)一下
c語言乘法的函數(shù)怎么寫?
#include "stdio.h" #include "conio.h" //導(dǎo)入getch();函數(shù) main(){ printf("%d",step()); getch(); } int step(){ int i,n,j; i=1; j=1; scanf ("%d", &n); for (i=1;i<=n;i++){ j = j*i; } return j; } 改進(jìn)一下