《C语言程序设计》江宝钏主编-习题1-5-求乘积

AC代码:

/*
Description 
仿照例1-3程序,编写程序:输入两个整数,输出两数之积
Input 
两个整数a b
Output 
a*b

Sample Input Copy 
2 3
Sample Output Copy 
6
*/

#include <stdio.h>
int main()
{
    int a,b,product;
    scanf("%d %d",&a,&b);
    product = a*b;
    printf("%d\n",product);
    return 0;
}

/*标程:
#include <stdio.h>
int main(int argc, char* argv[]){
	int a,b;
	while(~scanf("%d%d",&a,&b)){
	  printf("%d\n",a*b);
	}
	return 0;
}
*/
发布了39 篇原创文章 · 获赞 7 · 访问量 3695

猜你喜欢

转载自blog.csdn.net/qq_45599068/article/details/104083480