.读程序写出注释1:#include 2:int main( ) 3:{ 4:int product(int x,int y); 5:int val1,val2,val3; 6:printf(”Enter a number between 1 and 100:”);7:scanf(“%d”,&val1);8:printf(”Enter another number between 1 and 100:”);9:s
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 12:37:12
.读程序写出注释1:#include 2:int main( ) 3:{ 4:int product(int x,int y); 5:int val1,val2,val3; 6:printf(”Enter a number between 1 and 100:”);7:scanf(“%d”,&val1);8:printf(”Enter another number between 1 and 100:”);9:s
.读程序写出注释
1:#include
2:int main( )
3:{
4:int product(int x,int y);
5:int val1,val2,val3;
6:printf(”Enter a number between 1 and 100:”);
7:scanf(“%d”,&val1);
8:printf(”Enter another number between 1 and 100:”);
9:scanf(“%d”,&val2);
10:val3 = product(val1,val2);
11:printf("%d time %d=%d\n",val1,val2,val3);
12:return 0;
13:}
14:int product(int x,int y)
15:{
16:return(x*y);
17:}
.读程序写出注释1:#include 2:int main( ) 3:{ 4:int product(int x,int y); 5:int val1,val2,val3; 6:printf(”Enter a number between 1 and 100:”);7:scanf(“%d”,&val1);8:printf(”Enter another number between 1 and 100:”);9:s
1: #include
2: int main( )
3:{
4: int product(int x,int y); //调用函数product(x,y);
5: int val1,val2,val3; //定义三个变量.
6: printf(”Enter a number between 1 and 100:”); //输入1到100之间的一个数.
7: scanf(“%d”, &val1); //输入1到100之间的一个数.
8: printf(”Enter another number between 1 and 100:”);
9: scanf(“%d”, &val2); //输入1到100之间的另一个数.
10: val3 = product(val1,val2); //求两个数的乘积.
11: printf("%d time %d=%d\n", val1,val2,val3); //输出乘积
12: return 0;
13:}
14:int product(int x,int y)
15:{
16: return(x*y); //函数体.返回x,y的乘积.
17:}