home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programmer Plus 2007
/
Programmer-Plus-2007.iso
/
Programming
/
Student most wanted Languages
/
Turbo C v3.0
/
Tc3setup.exe
/
EXAMPLES
/
INTRO1.CPP
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1992-02-18
|
402 b
|
19 lines
//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;
}