码迷,mamicode.com
首页 > 其他好文 > 详细

第1章 开始

时间:2016-01-17 06:27:50      阅读:134      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!