[SOLVED] CS计算机代考程序代写 #include

30 $

File Name: CS计算机代考程序代写_#include.zip
File Size: 357.96 KB

SKU: 9129758678 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


#include
#include
using namespace std;

int main()
{
ofstream output;
// Create/open a file
output.open(“scores.txt”);
// Write two lines
output << “John” << ” ” << “T” << ” ” << “Smith” << ” ” << 90 << endl;output << “Eric” << ” ” << “K” << ” ” << “Jones” << ” ” << 85 << endl;// Close the fileoutput.close();cout << “Done” << endl;string firstName, lastName; char mi; int score;// open file in read modeifstream input(“scores.txt”);// Read lineinput >> firstName >> mi >> lastName >> score;
// until file is empty: print line, then read other line
while (!input.eof()) {
cout << firstName << ” ” << mi << ” ” << lastName << ” ” << score << endl;input >> firstName >> mi >> lastName >> score;
}
input.close();
cout << “Done” << endl;return 0;}

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] CS计算机代考程序代写 #include
30 $