getinfo.cpp

来自「《C++.Primer.Plus.第五版.中文版》的源代码」· C++ 代码 · 共 18 行

CPP
18
字号
// getinfo.cpp -- input and output#include <iostream>int main(){	using namespace std;		int carrots;		cout << "How many carrots do you have?" << endl;	cin >> carrots;    // C++ input	cout << "Here are two more. ";	carrots = carrots + 2;// the next line concatenates output	cout << "Now you have " << carrots << " carrots." << endl;	return 0;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?