首页 > 其他 > 详细

第1章 开始

时间:2016-01-17 06:25:14      阅读:244      评论:0      收藏:0      [点我收藏+]

1.4

 1 //Exercise 1.4: Our program used the addition operator, +, to add two numbers. Write a program that uses the multiplication operator, *, to print the product instead.
 2 #include<iostream>
 3 int main()
 4 {
 5     std::cout << "Enter two numbers:" << std::endl;
 6     int v1 = 0, v2 = 0;
 7     std::cin >> v1 >> v2;
 8     std::cout << "The product of " << v1 << " and " << v2 << " is " << v1*v2 << std::endl;
 9     return 0;
10 }

 

第1章 开始

原文:http://www.cnblogs.com/smallhouse/p/5136732.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!