Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

this is the previous code quest 1 this my question. I hope you can help LTE.id 2

ID: 3591723 • Letter: T

Question




this is the previous code quest 1

   


this my question. I hope you can help


LTE.id 28%1 9:30AM Quest 2 Class Grades This quest is going to improve upon the previous quest. We are now going to keep track of up to 30 student names and grades for up to 10 assignments. We should also bring in and adjust the code from the previous assignment in order to be able to curve a column of grades You will need an array of strings for the student names and a two dimensional array of ints for the grades. Grades are stored as percents You will also need variables to keep track of the number of students and number of assignments already entered. Your programs should also ensure that no more than 30 students are added and no more than 10 assignments The program should do the following: 1. Ask for the number of students in the class 2. Ask for the name of each student and add it to the array 3. Clear the screen 4. NEATLY display the list of students and grades 1. This should be done neatly. Use to line up columns

Explanation / Answer

Please go threw code it will work according to your assignment .

#include <iostream>

#include <stdlib.h>

using namespace std;

#define ASSI 10

int main()

{

int ns,i=0,j=0,total =0,points,gread[30][10];

float Avg;

string students[30];

string name;

int assiNo =0;

int assiGread =0;

char ch;

string AssiName;

cout <<"Enter Assignment name"<<endl;

cin >> AssiName;

do // loop up to user want

{

cout<<"Enter the number pf students in the class:";

cin >> ns;

cin.ignore(256,' ');

for(i=0;i<ns;i++) // students loop

{

cout<<"Please enter name of student"<<endl;

cin>>students[i];

cin.ignore(256,' '); // for ignor

cout << "Please enter greads for 10 assignments"<<endl;

for(j=0;j<ASSI;j++)

{

cin >> gread[i][j]; //enter gread

cin.ignore(256,' ');

}

}

system("clear"); // clear system

while(i++ < 50) // put border

cout <<"=";

cout<<endl;

i =0;

cout <<" " <<AssiName << endl;

i = 0;

while(i++ < 50)

cout <<"=";

cout<<endl;

for(i=0;i<ns;i++) // display details

{

Avg = 0;

total = 0 ;

cout << students[i];

for(j=0;j<ASSI;j++)

{

cout <<" "<<gread[i][j];

total = total + gread[i][j];

}

Avg = total/ASSI;

if(Avg > 70)

{

cout << "There is no curve." << endl;

}

else

{

cout << "You need to had 5 points."<<endl;

}

}

cout<< "Want to change student gread ? yes - y/Y no - n/N " << endl;

cin>>ch;

if(ch == 'y' || ch == 'Y') // want to change entry?

{

cin.ignore(256,' ');

cout << "Enter student name"<<endl;

cin>>name;

while(!name.compare(students[i]))

i++;

if(i> ns)

cout << "No any student found"<<endl;

else

{

cin.ignore(256,' ');

cout << "Enter assignment no"<<endl;;

cin >> assiNo;

cin.ignore(256,' ');

cout << " Enter gread of assignment";

cin >> assiGread;

cin.ignore(256,' ');

}

gread[i-1][assiNo-1] = assiGread;

cout<<students[i-1];

total = 0;

Avg =0;

for(j=0;j<ASSI;j++)

{

cout <<" "<<gread[i-1][j];

total = total + gread[i-1][j];

}

Avg = total/ASSI;

if(Avg > 70)

{

cout << "There is no curve." << endl;

}

else

{

cout << "You need to had 5 points."<<endl;

}

}

cout<< "Want to exit ? yes - y/Y no - n/N " << endl; // want to exit or continue?

cin>>ch;

}while(ch != 'y' || ch != 'Y');

return 0;

}