What program can i use to read this code, is it readable?

dellan

New member
Joined
Jun 7, 2023
Messages
1
Programming Experience
Beginner
What program can i use to read this code, is it readable?

This comes from the website C# Developer Community

C++:
void create()
{
    // file pointer
    fstream fout;
 
    // opens an existing csv file or creates a new file.
    fout.open("reportcard.csv", ios::eek:ut | ios::app);
 
    cout << "Enter the details of 5 students:"
         << " roll name maths phy chem bio";
    << endl;
 
    int i, roll, phy, chem, math, bio;
    string name;
 
    // Read the input
    for (i = 0; i < 5; i++) {
 
        cin >> roll
            >> name
            >> math
            >> phy
            >> chem
            >> bio;
 
        // Insert the data to file
        fout << roll << ", "
             << name << ", "
             << math << ", "
             << phy << ", "
             << chem << ", "
             << bio
             << "\n";
    }
}
 
Last edited by a moderator:

Latest posts

Back
Top Bottom