Paraphrase this code plz     #include using namespace std; struct studmodule{ char modulename[30]; int totalmarks; }; struct Student{ char name[30]; int age; int studid; struct studmodule module[4]; float avgmarks; }stud[5]; float avg; float classavg; int highmark=0; int lowmark=0; float passrate=0; void inputdata() { int i=0,tot; cout<<"-------------------------------------------"<>stud[i].name; cout<<"Enter Student "<>stud[i].studid; cout<<"Enter Student "<>stud[i].age; cout<<"-------------------------------------------"<>stud[i].module[j].modulename; cout<<"Enter Student "<>stud[i].module[j].totalmarks; if (stud[i].module[j].totalmarks>highmark) highmark=stud[i].module[j].totalmarks; if (stud[i].module[j].totalmarks=40) passrate=stud[i].avgmarks+passrate; passrate=passrate/4; } } void calculate() { int t=0; highmark=stud[0].module[0].totalmarks; lowmark=stud[0].module[0].totalmarks; for (int i=0;i<5;i++) { for(int j=0;j<4;j++) { if (highmarkstud[i].module[j].totalmarks) lowmark=stud[i].module[j].totalmarks; } t=t+stud[i].avgmarks; } classavg=t/5; } int overallresult() { cout<<"Overall Result analysis"<

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Paraphrase this code plz

 

 

#include<iostream>
using namespace std;
struct studmodule{
char modulename[30];
int totalmarks;
};

struct Student{
char name[30];
int age;
int studid;
struct studmodule module[4];
float avgmarks;
}stud[5];
float avg;
float classavg;
int highmark=0;
int lowmark=0;
float passrate=0;
void inputdata()
{
int i=0,tot;
cout<<"-------------------------------------------"<<endl;
cout<<"Welcome to Technology College Muscut"<<endl;
cout<<"-------------------------------------------"<<endl;
cout<<"Students Personnel data Entry"<<endl;
cout<<"-------------------------------------------"<<endl;
for (i=0;i<5;i++)
{
tot=0;
cout<<"Enter Student "<<i+1 << "Name :";
cin>>stud[i].name;
cout<<"Enter Student "<<i+1 << "Id Number :";
cin>>stud[i].studid;
cout<<"Enter Student "<<i+1 << "Age :";
cin>>stud[i].age;
cout<<"-------------------------------------------"<<endl;
cout<<"Students Academic data Entry"<<endl;
cout<<"-------------------------------------------"<<endl;
for (int j=0;j<4;j++)
{
cout<<"Enter Student "<<i+1 << "Module "<<j+1 <<" Name";
cin>>stud[i].module[j].modulename;
cout<<"Enter Student "<<i+1 << "Total Marks ";
cin>>stud[i].module[j].totalmarks;

if (stud[i].module[j].totalmarks>highmark)
highmark=stud[i].module[j].totalmarks;
if (stud[i].module[j].totalmarks<lowmark)
lowmark=stud[i].module[j].totalmarks;
tot=tot+stud[i].module[j].totalmarks;
stud[i].avgmarks=tot/4;
cout<<"-------------------------------------------"<<endl;
}

}

}
void outputdata()
{
cout<<"Dispalying Student Information"<<endl;
cout<<"-------------------------------------------"<<endl;
for (int i=0;i<5;i++)
{
cout<<"Student "<<i+1 << "Name :"<<stud[i].name<<endl;
cout<<"Student "<<i+1 << "Id Number :"<<stud[i].studid<<endl;
cout<<"Student "<<i+1 << "Age :"<<stud[i].age<<endl;
cout<<"Student "<<i+1 <<"Modules";
for(int j=0;j<4;j++)
cout<<stud[i].module[j].modulename<<",";
cout<<endl<<"Student "<<i+1 << "Average Marks"<<stud[i].avgmarks<<endl;
cout<<"-------------------------------------------"<<endl;
if (stud[i].avgmarks >=40)
passrate=stud[i].avgmarks+passrate;
passrate=passrate/4;
}

}
void calculate()
{
int t=0;
highmark=stud[0].module[0].totalmarks;
lowmark=stud[0].module[0].totalmarks;
for (int i=0;i<5;i++)
{
for(int j=0;j<4;j++)
{

if (highmark<stud[i].module[j].totalmarks)
highmark=stud[i].module[j].totalmarks;
if (lowmark>stud[i].module[j].totalmarks)
lowmark=stud[i].module[j].totalmarks;
}
t=t+stud[i].avgmarks;
}
classavg=t/5;
}
int overallresult()
{
cout<<"Overall Result analysis"<<endl;
cout<<"Class Average Marks"<<classavg<<endl;
cout<<"Class Highest Marks"<<highmark<<endl;
cout<<"Class Lowest Marks"<<lowmark<<endl;
cout<<"Class Pass Marks"<<passrate<<endl;

}
int main()
{
inputdata();
outputdata();
calculate();
overallresult();

}

 

 

Expert Solution
steps

Step by step

Solved in 3 steps with 6 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY