Someone Please Fix Program Trying Display Names Student Grade Total Include Include Inclu Q37088009

Can someone please fix this program . we trying to display thenames of the student, the grade and the total

#include <iostream>

#include <fstream>

#include <string>

using namespace std;

const int row = 5;

const int col = 3;

ifstream inn;

ifstream ing;

ofstream out;

void readdata(string stname[row], int stgrade[row][col]);

void sttotal(int stgrade[row][col], total [row]);

void displaydata(string stname[row], int stgrade[row][col], inttotal[row]);

void main()

{

int stg[row][col] = { {0},{0} };

string stn[row] = {};

int stt[row] = { 0 };

readdata(stn, stg);

sttotal(stg, stt);

displaydata(stn, stg, stt);

}

readdata(string stname[row], int stgrade[row][col])

{

int r, c

inn.open(“name.txt”);

ing.open(“grade.txt”);

for (r = 0, r < row; r++)

{

inn >> stg[r][c]

}

void sttotal(int stgrade[row][col], int total[row])

{

int r, c;

for (r = 0, r < row, r++)

{

for (c = 0, c < col,

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.