0% found this document useful (0 votes)
35 views

#Include Using Namespace Void Int Double Char

This C++ program collects student data including name, ID, grades for quizzes, labs, assignments, and prelim exam. It calculates total scores, number of items, percentage scores, class standing, prelim raw score and prelim grade. The data is input by the user and various calculations are performed and output.

Uploaded by

Vtg
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

#Include Using Namespace Void Int Double Char

This C++ program collects student data including name, ID, grades for quizzes, labs, assignments, and prelim exam. It calculates total scores, number of items, percentage scores, class standing, prelim raw score and prelim grade. The data is input by the user and various calculations are performed and output.

Uploaded by

Vtg
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

#include<iostream>

using namespace std;


void main ()
{
int q1, tq1, q2, tq2, q3, tq3, l1, tl1, l2, tl2, l3, tl3, l4, tl4, l5, tl5, l6, tl6, l7,
tl7, a1, ta1;
double sq, stq, sl, stl, pe, tpe, pq, pl, pa, ppe, cs, prs, pg;
char prog[30], idnum[30], fname[30], lname [30];

cout<<"Program: ";
cin.getline(prog,30);
cout<<"ID Number: ";
cin.getline(idnum,30);
cout<<"First Name: ";
cin.getline(fname,30);
cout<<"Last Name: ";
cin.getline(lname,30);

cout<<"________________________________________________________________________________________
_____________"<<endl;

cout<<"Quizzes:";
cout<<"\n\nQuiz 1: ";
cin>>q1;
cout<<"Total Items: ";
cin>>tq1;
cout<<"Quiz 2: ";
cin>>q2;
cout<<"Total Items: ";
cin>>tq2;
cout<<"Quiz 3: ";
cin>>q3;
cout<<"Total Items: ";
cin>>tq3;

sq=q1+q2+q3;
cout<<"\nTotal Score in Quizzes: "<<sq;
stq=tq1+tq2+tq3;
cout<<"\nTotal Items in Quizzes: "<<stq;

cout<<"\n______________________________________________________________________________________
_______________"<<endl;

cout<<"Laboratory Activities:";
cout<<"\n\nLaboratory Acitivity 1: ";
cin>>l1;
cout<<"Total Items: ";
cin>>tl1;
cout<<"Laboratory Acitivity 2: ";
cin>>l2;
cout<<"Total Items: ";
cin>>tl2;
cout<<"Laboratory Acitivity 3: ";
cin>>l3;
cout<<"Total Items: ";
cin>>tl3;
cout<<"Laboratory Acitivity 4: ";
cin>>l4;
cout<<"Total Items: ";
cin>>tl4;
cout<<"Laboratory Acitivity 5: ";
cin>>l5;
cout<<"Total Items: ";
cin>>tl5;
cout<<"Laboratory Acitivity 6: ";
cin>>l6;
cout<<"Total Items: ";
cin>>tl6;
cout<<"Laboratory Acitivity 7: ";
cin>>l7;
cout<<"Total Items: ";
cin>>tl7;

sl=l1+l2+l3+l4+l5+l6+l7;
cout<<"\nTotal Scores in Laboratory Activities: "<<sl;
stl=tl1+tl2+tl3+tl4+tl5+tl6+tl7;
cout<<"\nTotal Items in Laboratory Activities: "<<stl;

cout<<"\n______________________________________________________________________________________
_______________"<<endl;

cout<<"Assignment:";
cout<<"\n\nAssignment 1: ";
cin>>a1;
cout<<"Total Items: ";
cin>>ta1;

cout<<"________________________________________________________________________________________
_____________"<<endl;

cout<<"Prelim Exam:";
cout<<"\n\nPrelim Exam: ";
cin>>pe;
cout<<"Total Items: ";
cin>>tpe;

cout<<"________________________________________________________________________________________
_____________"<<endl;

cout<<"Percentage Equivalent:";
pq=(sq/stq)*0.20*100;
cout<<"\n\nQuiz: "<<pq;
pl=(sl/stl)*0.20*100;
cout<<"\nLaboratory Acitivity: "<<pl;
pa=(a1/ta1)*0.10*100;
cout<<"\nAssignment: "<<pa;
ppe=(pe/tpe)*0.50*100;
cout<<"\nPrelim Exam: "<<ppe;

cout<<"\n______________________________________________________________________________________
_______________"<<endl;

cs=pq+pl+pa;
cout<<"\nClass Standing: "<<cs;

prs=cs+ppe;
cout<<"\nPrelim Raw Score: "<<prs;

pg=(prs/2)+50;
cout<<"\nPrelim Grade: "<<pg<<endl;

You might also like