intro1.cpp

来自「c compiler with added projects...」· C++ 代码 · 共 19 行

CPP
19
字号
//INTRO1.CPP--Example from Chapter 3, "An Introduction to C++" 

#include <iostream.h>

int main()
{
   int   bushels;
   float dollars, rate;
	cout << "How many dollars did you get? $";
	cin >> dollars;
	cout << "For how many bushels? ";
	cin >> bushels;
	rate = dollars / bushels;
	cout.precision(2);
	cout << "You have received $" << rate << " for each bushel.\n";

   return 0;
}

⌨️ 快捷键说明

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