1.2 初识输入输出

版权声明:本文为博主原创文章,未经博主允许不得转载 https://blog.csdn.net/qit1314/article/details/89925596

书中页数:P6
代码名称:add.cc

    #include <iostream>
    
    int main()
    {
    	// prompt user to enter two numbers
    	std::cout << "Enter two numbers:" << std::endl; 
    	int v1 = 0, v2 = 0;
    	std::cin >> v1 >> v2;   
    	std::cout << "The sum of " << v1 << " and " << v2
    	          << " is " << v1 + v2 << std::endl;
    	return 0;
    }

猜你喜欢

转载自blog.csdn.net/qit1314/article/details/89925596
1.2