{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

reading_from_file

reading_from_file - input statements infile>> length...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 // reading_from_file #include <iostream> #include <fstream> using namespace std int main() { // *********** declaration statements ************* int length = 0 int width = 0 int perimeter = 0 ifstream infile("C:/Temp/data.txt")
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: // ************ input statements ****************** infile >> length infile >> width perimeter = length * 2 + width * 2 cout << "perimeter of rectangle: " << perimeter << endl return 0 }// end of main...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online