Thursday, October 10, 2019

Students Grading System in C++ Using Structures

A Students Grading System in C++ Using Structures written by my friend Sir Christian Catilogo that allows us to share on my website. Thank you very much, Sir Christian.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.




Sample Program Output



Program Listing

grades.cpp

#include <iostream>
#include<iomanip>
#include<windows.h>
using namespace std;
struct student
    {
char Lname[25], Fname[25],Mname[25],course[25];
int studno,recordno,yearlevel,mquiz[2],mass[2], mattendance,mexam,mproject,mrecitation,
fquiz[2],fass[2],fattendance,fexam,fproject,frecitation;
float mquizgrade=0.0, mquiztotal=0.0, mquizave,mprojectave,mrecitationave,
massgrade=0.0, masstotal=0.0, massave,mattave,mexamave,midtotal=0.0,midave,
fquizgrade=0.0, fquiztotal=0.0, fquizave, fprojectave,frecitationave,
fassgrade=0.0, fasstotal=0.0, fassave,fattave,fexamave,finaltotal=0.0,finalave,
finalgrade;
    };
    
    int comparator (const void* p, const void* q)
    {
    return (((struct student*)p)->finalgrade < ((struct student*)q)->finalgrade);
}
int main()
{
HANDLE color=GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(color,15);
char let;
int arr=0,studentno=0;
do{

       student stud[50];
       qsort(stud, arr, sizeof(struct student), comparator);
SetConsoleTextAttribute(color,14);
cout<<"\n\t\t\t\t\t STUDENT RECORD \n";
cout<<"\t\t\t\t\t    ~~MENU~~\n";
SetConsoleTextAttribute(color,11);
cout<<"\n\t\t\t\t     Press 1 Create Record \n";
cout<<"\n\t\t\t\t     Press 2 Delete Record \n";
cout<<"\n\t\t\t\t     Press 3 Update Record \n";
cout<<"\n\t\t\t\t     Press 4 Search Record \n";
cout<<"\n\t\t\t\t     Press 5 Display Record \n";
cout<<"\n\t\t\t\t     Press 6 Display Ranking \n";
SetConsoleTextAttribute(color,12);
cout<<"\n\t\t\t\t    (Input must be integer)\n";
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t\t\t\t Select Option: ";
int stchek=0;
    int sw;
    SetConsoleTextAttribute(color,15);
cin>>sw;
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again ";
cin.clear();
cin.ignore();
goto repeat;
}
switch (sw)
{
   case 1:
    aaa:
    SetConsoleTextAttribute(color,13);
        cout<<"\n\t\t\t Enter the Data of the student to create record "<<endl;
        SetConsoleTextAttribute(color,11);
        cout<<"\n \t\t Enter Record number = ";    
int st2;
int st;
SetConsoleTextAttribute(color,15);    
cin>>st;
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
goto aaa;
}    
for(int j=0;j<=arr;j++)
{
   
  
   st2=st;
if(st2==stud[j].recordno)
{
   stchek=1;
   }
}
if(stchek!=1){
   stud[arr].recordno=st;    
   int i=0;
cout<<"\n \t\t The Student no = ";
SetConsoleTextAttribute(color,15);
cout<<"19-0"<<++studentno<<endl;
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter the Last Name =  ";
SetConsoleTextAttribute(color,15);
cin>>stud[arr].Lname;
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter the First Name =  ";
SetConsoleTextAttribute(color,15);
cin>>stud[arr].Fname;
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter the Middle Name =  ";
SetConsoleTextAttribute(color,15);
cin>>stud[arr].Mname;
SetConsoleTextAttribute(color,11);
        cout<<"\n \t\t Enter the Course = ";
        SetConsoleTextAttribute(color,15);
cin>>stud[arr].course;
yl:
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter the Year Level = ";
SetConsoleTextAttribute(color,15);
cin>>stud[arr].yearlevel;
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
goto yl;
}
else if(stud[arr].yearlevel>5)
{
SetConsoleTextAttribute(color,12);
cout<<"\n\t\t The maximum Yearlevel is [5] ";
cout<<"\n\t\t Please try it Again \n";
goto yl;
}
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t\t\t\t [Enter Midterm Grade] ";
SetConsoleTextAttribute(color,14);
cout<<"\n \t\t Quiz Average Grade = (20%)";
for (int quiz=0; quiz<2; quiz++)
{
a:
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter Quiz grade no "<<++i<<" = ";
SetConsoleTextAttribute(color,15);
cin>>stud[arr].mquiz[quiz];
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
i=i-1;
goto a;
}
else if(stud[arr].mquiz[quiz]<50 || stud[arr].mquiz[quiz]>100)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!!";
cout<<"\n \t\t Input Shouldn't be Lessthan 50 or Greaterthan 100 ";
cout<<"\n \t\t Please Try it Again \n";
i=i-1;
goto a;
}
}
for (int quiz=0; quiz<2; quiz++)
{
stud[arr].mquizgrade+=stud[arr].mquiz[quiz];
}
stud[arr].mquiztotal=stud[arr].mquizgrade/2;
stud[arr].mquizave=stud[arr].mquiztotal*.2;
i=0;
SetConsoleTextAttribute(color,14);
cout<<"\n \t\t Assignment Average Grade = (10%)";
for (int ass=0; ass<2; ass++)
{
b:
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter Assignment Grade no "<<++i<<" = ";
SetConsoleTextAttribute(color,15);
cin>>stud[arr].mass[ass];
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
i=i-1;
goto b;
}
else if (stud[arr].mass[ass]<50 || stud[arr].mass[ass]>100)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!!";
cout<<"\n \t\t Input Shouldn't be Lessthan 50 or Greaterthan 100 ";
cout<<"\n \t\t Please Try it Again \n";
i=i-1;
goto b;
}
}
for (int ass=0; ass<2; ass++)
{
stud[arr].massgrade+=stud[arr].mass[ass];
}
stud[arr].masstotal=stud[arr].massgrade/2;
stud[arr].massave=stud[arr].masstotal*.1;
SetConsoleTextAttribute(color,14);
cout<<"\n \t\t Attendance Average Grade = (10%)";
c:
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter Attendance Grade = ";
SetConsoleTextAttribute(color,15);
cin>>stud[arr].mattendance;
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
goto c;
}
else if(stud[arr].mattendance<50 || stud[arr].mattendance>100)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!!";
cout<<"\n \t\t Input Shouldn't be Lessthan 50 or Greaterthan 100 ";
cout<<"\n \t\t Please Try it Again \n";
goto c;
}
stud[arr].mattave=stud[arr].mattendance*.1;
SetConsoleTextAttribute(color,14);
cout<<"\n \t\t Midterm Exam Average Grade = (30%)";
d:
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter Midterm Exam Grade = ";
SetConsoleTextAttribute(color,15);
cin>>stud[arr].mexam;
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
goto d;
}
else if (stud[arr].mexam<50 || stud[arr].mexam>100)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!!";
cout<<"\n \t\t Input Shouldn't be Lessthan 50 or Greaterthan 100 ";
cout<<"\n \t\t Please Try it Again \n";
goto d;
}
stud[arr].mexamave=stud[arr].mexam*.3;
SetConsoleTextAttribute(color,14);
cout<<"\n \t\t Project Average Grade = (20%) ";
e:
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter Project Grade = ";
SetConsoleTextAttribute(color,15);
cin>>stud[arr].mproject;
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
goto e;
}
else if (stud[arr].mproject<50 || stud[arr].mproject>100)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!!";
cout<<"\n \t\t Input Shouldn't be Lessthan 50 or Greaterthan 100 ";
cout<<"\n \t\t Please Try it Again \n";
goto e;
}
stud[arr].mprojectave=stud[arr].mproject*.2;
SetConsoleTextAttribute(color,14);
cout<<"\n \t\t Recitation Average Grade = (10%) ";
f:
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter Recitation Grade = ";
SetConsoleTextAttribute(color,15);
cin>>stud[arr].mrecitation;
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
goto f;
}
else if (stud[arr].mrecitation<50 || stud[arr].mrecitation>100)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!!";
cout<<"\n \t\t Input Shouldn't be Lessthan 50 or Greaterthan 100 ";
cout<<"\n \t\t Please Try it Again \n";
goto f;
}
stud[arr].mrecitationave=stud[arr].mrecitation*.1;
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t\t\t\t[Enter Finalterm Grade] ";
SetConsoleTextAttribute(color,14);
cout<<"\n \t\t Quiz Average Grade = (20%)";
i=0;
for (int quiz=0; quiz<2; quiz++)
{
aa:
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter Quiz grade no "<<++i<<" = ";
SetConsoleTextAttribute(color,15);
cin>>stud[arr].fquiz[quiz];
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
i=i-1;
goto aa;
}
else if(stud[arr].fquiz[quiz]<50 || stud[arr].fquiz[quiz]>100)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!!";
cout<<"\n \t\t Input Shouldn't be Lessthan 50 or Greaterthan 100 ";
cout<<"\n \t\t Please Try it Again \n";
i=i-1;
goto aa;
}
}
for (int quiz=0; quiz<2; quiz++)
{
stud[arr].fquizgrade+=stud[arr].fquiz[quiz];
}
stud[arr].fquiztotal=stud[arr].fquizgrade/2;
stud[arr].fquizave=stud[arr].fquiztotal*.2;
i=0;
SetConsoleTextAttribute(color,14);
cout<<"\n \t\t Assignment Average Grade = (10%)";
for (int ass=0; ass<2; ass++)
{
bb:
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter Assignment Grade no "<<++i<<" = ";
SetConsoleTextAttribute(color,15);
cin>>stud[arr].fass[ass];
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
i=i-1;
goto bb;
}
else if (stud[arr].fass[ass]<50 || stud[arr].fass[ass]>100)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!!";
cout<<"\n \t\t Input Shouldn't be Lessthan 50 or Greaterthan 100 ";
cout<<"\n \t\t Please Try it Again \n";
i=i-1;
goto bb;
}
}
for (int ass=0; ass<2; ass++)
{
stud[arr].fassgrade+=stud[arr].fass[ass];
}
stud[arr].fasstotal=stud[arr].fassgrade/2;
stud[arr].fassave=stud[arr].fasstotal*.1;
SetConsoleTextAttribute(color,14);
cout<<"\n \t\t Attendance Average Grade = (10%)";
cc:
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter Attendance Grade = ";
SetConsoleTextAttribute(color,15);
cin>>stud[arr].fattendance;
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
goto cc;
}
else if(stud[arr].fattendance<50 || stud[arr].fattendance>100)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!!";
cout<<"\n \t\t Input Shouldn't be Lessthan 50 or Greaterthan 100 ";
cout<<"\n \t\t Please Try it Again \n";
goto cc;
}
stud[arr].fattave=stud[arr].fattendance*.1;
SetConsoleTextAttribute(color,14);
cout<<"\n \t\t Midterm Exam Average Grade = (30%)";
dd:
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter Midterm Exam Grade = ";
SetConsoleTextAttribute(color,15);
cin>>stud[arr].fexam;
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
goto dd;
}
else if (stud[arr].fexam<50 || stud[arr].fexam>100)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!!";
cout<<"\n \t\t Input Shouldn't be Lessthan 50 or Greaterthan 100 ";
cout<<"\n \t\t Please Try it Again \n";
goto dd;
}
stud[arr].fexamave=stud[arr].fexam*.3;
SetConsoleTextAttribute(color,14);
cout<<"\n \t\t Project Average Grade = (20%) ";
ee:
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter Project Grade = ";
SetConsoleTextAttribute(color,15);
cin>>stud[arr].fproject;
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
goto ee;
}
else if (stud[arr].fproject<50 || stud[arr].fproject>100)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!!";
cout<<"\n \t\t Input Shouldn't be Lessthan 50 or Greaterthan 100 ";
cout<<"\n \t\t Please Try it Again \n";
goto ee;
}
stud[arr].fprojectave=stud[arr].fproject*.2;
SetConsoleTextAttribute(color,14);
cout<<"\n \t\t Recitation Average Grade = (10%) ";
ff:
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter Recitation Grade = ";
SetConsoleTextAttribute(color,15);
cin>>stud[arr].frecitation;
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
goto ff;
}
else if (stud[arr].frecitation<50 || stud[arr].frecitation>100)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!!";
cout<<"\n \t\t Input Shouldn't be Lessthan 50 or Greaterthan 100 ";
cout<<"\n \t\t Please Try it Again \n";
goto ff;
}
stud[arr].frecitationave=stud[arr].frecitation*.1;
stud[arr].midtotal=stud[arr].midtotal+stud[arr].mquizave+stud[arr].massave+stud[arr].mattave+
stud[arr].mexamave+stud[arr].mprojectave+stud[arr].mrecitationave;
stud[arr].finaltotal=stud[arr].finaltotal+stud[arr].fquizave+stud[arr].fassave+stud[arr].fattave+
stud[arr].fexamave+stud[arr].fprojectave+stud[arr].frecitationave;
stud[arr].midave=stud[arr].midtotal*.50;
stud[arr].finalave=stud[arr].finaltotal*.50;
stud[arr].finalgrade=stud[arr].midave+stud[arr].finalave;
stud[arr].studno=studentno;
arr=arr+1;
   }
   else
   {
    SetConsoleTextAttribute(color,12);
   cout<<"\n \t\t\t      This Record Number already have record \n";
   }        
            break;
case 2:
bbb:
SetConsoleTextAttribute(color,13);    
        cout<<"\n\t\t      Enter the Record number of the student record To Delete : ";
SetConsoleTextAttribute(color,15);
cin>>st;
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
goto bbb;
}    
for(int j=0;j<=arr;j++)
{
   
  
   st2=st;
if(st2==stud[j].recordno)
{
stud[j].recordno='d';
SetConsoleTextAttribute(color,12);
cout<<"\n\t\t\t\t\t [Record Deleted]";
SetConsoleTextAttribute(color,15);
}
}
        break;
case 3:
ccc:
SetConsoleTextAttribute(color,13);
cout<<"\n\t\t\t Enter the Record no of the student To Update : ";
SetConsoleTextAttribute(color,15);   
    cin>>st;
    SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
goto ccc;
}    
   for(int j=0;j<=arr;j++)
   {   
   st2=st;
   if(st2==stud[j].recordno)
   {
    int i=0;
cout<<"\n\t\t Recordno =  ";   
cout<<stud[j].recordno;
cout<<"\n\t\t Student no = 19-0"<<stud[j].studno;
cout<<"\n \t\t Last Name =  ";
cout<<stud[j].Lname;
cout<<"\n \t\t First Name =  ";
cout<<stud[j].Fname;
    cout<<"\n \t\t Middle Name =  ";
cout<<stud[j].Mname;
cout<<"\n \t\t Course = ";
cout<<stud[j].course;
    cout<<"\n \t\t Year Level =  ";
cout<<stud[j].yearlevel;
SetConsoleTextAttribute(color,12);   
cout<<"\n\t\t\t\t\t ReEnter Data  ";
SetConsoleTextAttribute(color,11);
cout<<"\n\t\t Enter the Last Name =  ";
SetConsoleTextAttribute(color,15);
cin>>stud[j].Lname;
SetConsoleTextAttribute(color,11);
cout<<"\n\t\t Enter the First Name =  ";
SetConsoleTextAttribute(color,15);
cin>>stud[j].Fname;
SetConsoleTextAttribute(color,11);
cout<<"\n\t\t Enter the Middle Name =  ";
SetConsoleTextAttribute(color,15);
cin>>stud[j].Mname;
SetConsoleTextAttribute(color,11);
        cout<<"\n\t\t Enter the Course = ";
        SetConsoleTextAttribute(color,15);
cin>>stud[j].course;
SetConsoleTextAttribute(color,11);
yls:
cout<<"\n\t\t Enter the Year Level =  ";
SetConsoleTextAttribute(color,15);
cin>>stud[j].yearlevel;
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
goto yls;
}
else if(stud[arr].yearlevel>5)
{
SetConsoleTextAttribute(color,12);
cout<<"\n\t\t The maximum Yearlevel is [5] ";
cout<<"\n\t\t Please try it Again \n";
goto yls;
}
SetConsoleTextAttribute(color,12);
cout<<"\n\t\t\t\t\t [Enter Midterm Grade] ";
SetConsoleTextAttribute(color,14);
cout<<"\n \t\t Quiz Average Grade = (20%)";
for (int quiz=0; quiz<2; quiz++)
{
g:
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter Quiz grade no "<<++i<<" = ";
SetConsoleTextAttribute(color,15);
cin>>stud[j].mquiz[quiz];
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
i=i-1;
goto g;
}
else if(stud[j].mquiz[quiz]<50 || stud[j].mquiz[quiz]>100)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!!";
cout<<"\n \t\t Input Shouldn't be Lessthan 50 or Greaterthan 100 ";
cout<<"\n \t\t Please Try it Again \n";
i=i-1;
goto g;
}
}
for (int quiz=0; quiz<2; quiz++)
{
stud[j].mquizgrade+=stud[j].mquiz[quiz];
}
stud[j].mquiztotal=stud[j].mquizgrade/2;
stud[j].mquizave=stud[j].mquiztotal*.2;
i=0;
SetConsoleTextAttribute(color,14);
cout<<"\n \t\t Assignment Average Grade = (10%)";
for (int ass=0; ass<2; ass++)
{
h:
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter Assignment Grade no "<<++i<<" = ";
SetConsoleTextAttribute(color,15);
cin>>stud[j].mass[ass];
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
i=i-1;
goto h;
}
else if (stud[j].mass[ass]<50 || stud[j].mass[ass]>100)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!!";
cout<<"\n \t\t Input Shouldn't be Lessthan 50 or Greaterthan 100 ";
cout<<"\n \t\t Please Try it Again \n";
i=i-1;
goto h;
}
}
for (int ass=0; ass<2; ass++)
{
stud[j].massgrade+=stud[j].mass[ass];
}
stud[j].masstotal=stud[j].massgrade/2;
stud[j].massave=stud[j].masstotal*.1;
SetConsoleTextAttribute(color,14);
cout<<"\n \t\t Attendance Average Grade = (10%)";
i:
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter Attendance Grade = ";
SetConsoleTextAttribute(color,15);
cin>>stud[j].mattendance;
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
goto i;
}
else if(stud[j].mattendance<50 || stud[j].mattendance>100)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!!";
cout<<"\n \t\t Input Shouldn't be Lessthan 50 or Greaterthan 100 ";
cout<<"\n \t\t Please Try it Again \n";
goto i;
}
stud[j].mattave=stud[j].mattendance*.1;
SetConsoleTextAttribute(color,14);
cout<<"\n \t\t Midterm Exam Average Grade = (30%)";
j:
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter Midterm Exam Grade = ";
SetConsoleTextAttribute(color,15);
cin>>stud[j].mexam;
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
goto j;
}
else if (stud[j].mexam<50 || stud[j].mexam>100)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!!";
cout<<"\n \t\t Input Shouldn't be Lessthan 50 or Greaterthan 100 ";
cout<<"\n \t\t Please Try it Again \n";
goto j;
}
stud[j].mexamave=stud[j].mexam*.3;
SetConsoleTextAttribute(color,14);
cout<<"\n \t\t Project Average Grade = (20%) ";
k:
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter Project Grade = ";
SetConsoleTextAttribute(color,15);
cin>>stud[j].mproject;
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
goto k;
}
else if (stud[j].mproject<50 || stud[j].mproject>100)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!!";
cout<<"\n \t\t Input Shouldn't be Lessthan 50 or Greaterthan 100 ";
cout<<"\n \t\t Please Try it Again \n";
goto k;
}
stud[j].mprojectave=stud[j].mproject*.2;
SetConsoleTextAttribute(color,14);
cout<<"\n \t\t Recitation Average Grade = (10%) ";
l:
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter Recitation Grade = ";
SetConsoleTextAttribute(color,15);
cin>>stud[j].mrecitation;
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
goto l;
}
else if (stud[j].mrecitation<50 || stud[j].mrecitation>100)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!!";
cout<<"\n \t\t Input Shouldn't be Lessthan 50 or Greaterthan 100 ";
cout<<"\n \t\t Please Try it Again \n";
goto l;
}
stud[j].mrecitationave=stud[j].mrecitation*.1;
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t\t\t\t [Enter Finalterm Grade] ";
SetConsoleTextAttribute(color,14);
cout<<"\n \t\t Quiz Average Grade = (20%)";
i=0;
for (int quiz=0; quiz<2; quiz++)
{
gg:
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter Quiz grade no "<<++i<<" = ";
SetConsoleTextAttribute(color,15);
cin>>stud[j].fquiz[quiz];
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
i=i-1;
goto gg;
}
else if(stud[j].fquiz[quiz]<50 || stud[j].fquiz[quiz]>100)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!!";
cout<<"\n \t\t Input Shouldn't be Lessthan 50 or Greaterthan 100 ";
cout<<"\n \t\t Please Try it Again \n";
i=i-1;
goto gg;
}
}
for (int quiz=0; quiz<2; quiz++)
{
stud[j].fquizgrade+=stud[j].fquiz[quiz];
}
stud[j].fquiztotal=stud[j].fquizgrade/2;
stud[j].fquizave=stud[j].fquiztotal*.2;
i=0;
SetConsoleTextAttribute(color,14);
cout<<"\n \t\t Assignment Average Grade = (10%)";
for (int ass=0; ass<2; ass++)
{
hh:
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter Assignment Grade no "<<++i<<" = ";
SetConsoleTextAttribute(color,15);
cin>>stud[j].fass[ass];
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
i=i-1;
goto hh;
}
else if (stud[j].fass[ass]<50 || stud[j].fass[ass]>100)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!!";
cout<<"\n \t\t Input Shouldn't be Lessthan 50 or Greaterthan 100 ";
cout<<"\n \t\t Please Try it Again \n";
i=i-1;
goto hh;
}
}
for (int ass=0; ass<2; ass++)
{
stud[j].fassgrade+=stud[j].fass[ass];
}
stud[j].fasstotal=stud[j].fassgrade/2;
stud[j].fassave=stud[j].fasstotal*.1;
SetConsoleTextAttribute(color,14);
cout<<"\n \t\t Attendance Average Grade = (10%)";
ii:
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter Attendance Grade = ";
SetConsoleTextAttribute(color,15);
cin>>stud[j].fattendance;
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
goto ii;
}
else if(stud[j].fattendance<50 || stud[j].fattendance>100)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!!";
cout<<"\n \t\t Input Shouldn't be Lessthan 50 or Greaterthan 100 ";
cout<<"\n \t\t Please Try it Again \n";
goto ii;
}
stud[j].fattave=stud[j].fattendance*.1;
SetConsoleTextAttribute(color,14);
cout<<"\n \t\t Midterm Exam Average Grade = (30%)";
jj:
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter Midterm Exam Grade = ";
SetConsoleTextAttribute(color,15);
cin>>stud[j].fexam;
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
goto jj;
}
else if (stud[j].fexam<50 || stud[j].fexam>100)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!!";
cout<<"\n \t\t Input Shouldn't be Lessthan 50 or Greaterthan 100 ";
cout<<"\n \t\t Please Try it Again \n";
goto jj;
}
stud[j].fexamave=stud[j].fexam*.3;
SetConsoleTextAttribute(color,14);
cout<<"\n \t\t Project Average Grade = (20%) ";
kk:
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter Project Grade = ";
SetConsoleTextAttribute(color,15);
cin>>stud[j].fproject;
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
goto kk;
}
else if (stud[j].fproject<50 || stud[j].fproject>100)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!!";
cout<<"\n \t\t Input Shouldn't be Lessthan 50 or Greaterthan 100 ";
cout<<"\n \t\t Please Try it Again \n";
goto kk;
}
stud[j].fprojectave=stud[j].fproject*.2;
SetConsoleTextAttribute(color,14);
cout<<"\n \t\t Recitation Average Grade = (10%) ";
ll:
SetConsoleTextAttribute(color,11);
cout<<"\n \t\t Enter Recitation Grade = ";
SetConsoleTextAttribute(color,15);
cin>>stud[j].frecitation;
SetConsoleTextAttribute(color,11);
if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
goto ll;
}
else if (stud[j].frecitation<50 || stud[j].frecitation>100)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!!";
cout<<"\n \t\t Input Shouldn't be Lessthan 50 or Greaterthan 100 ";
cout<<"\n \t\t Please Try it Again \n";
goto ll;
}
stud[j].frecitationave=stud[j].frecitation*.1;
stud[j].frecitationave=stud[j].frecitation*.1;
stud[j].midtotal=stud[j].midtotal+stud[j].mquizave+stud[j].massave+stud[j].mattave+
stud[j].mexamave+stud[j].mprojectave+stud[j].mrecitationave;
stud[j].finaltotal=stud[j].finaltotal+stud[j].fquizave+stud[j].fassave+stud[j].fattave+
stud[j].fexamave+stud[j].fprojectave+stud[j].frecitationave;
stud[j].midave=stud[j].midtotal*.50;
stud[j].finalave=stud[j].finaltotal*.50;
stud[j].finalgrade=stud[j].midave+stud[j].finalave;
}
}studentno-=1;    
            break;
case 4:
ddd:
SetConsoleTextAttribute(color,13);
cout<<"\n \t\t\t Enter the Record number To Search : ";
SetConsoleTextAttribute(color,15);
    cin>>st;
    SetConsoleTextAttribute(color,15);
  if(!cin)
{
SetConsoleTextAttribute(color,12);
cout<<"\n \t\t Invalid Input !!! ";
cout<<"\n \t\t Please Try it Again \n";
cin.clear();
cin.ignore();
goto ddd;
}          
    for(int j=0;j<=arr;j++)
   
   st2=st;
    if(st2==stud[j].recordno)
    {
cout<<fixed<<showpoint;
    cout<<setprecision(2);
SetConsoleTextAttribute(color,15);
cout<<"\n\t\tRecordno = ";   
cout<<stud[j].recordno;
cout<<"\n\t\tStudent no = 19-0"<<stud[j].studno;
cout<<"\n\t\tLast Name = ";
cout<<stud[j].Lname;
cout<<"\n\t\tFirst Name = ";
cout<<stud[j].Fname;
    cout<<"\n\t\tMiddle Name = ";
cout<<stud[j].Mname;
cout<<"\n\t\tCourse = ";
cout<<stud[j].course;
    cout<<"\n\t\tYear Level = ";
cout<<stud[j].yearlevel;
SetConsoleTextAttribute(color,14);
  cout<<"\n\t\t\t\t       [Midterm Grade Record]";
  SetConsoleTextAttribute(color,15);
  cout<<"\n\t\t\t+------------------------+------------------------+";
  cout<<"\n\t\t\t|\t Catergory"<<"\t |\t   Average \t  |";
cout<<"\n\t\t\t+------------------------+------------------------+";
cout<<"\n\t\t\t|   Quiz Average\t |\t   "<<stud[j].mquizave<<"%\t  |";
cout<<"\n\t\t\t|   Assignment Average\t |\t   "<<stud[j].massave<<"%\t  |";
cout<<"\n\t\t\t|   Attendance Average\t |\t   "<<stud[j].mattave<<"%\t  |";
cout<<"\n\t\t\t|   Midterm Exam Average |\t   "<<stud[j].mexamave<<"%\t  |";
cout<<"\n\t\t\t|   Project Average\t |\t   "<<stud[j].mprojectave<<"%\t  |";
cout<<"\n\t\t\t|   Recitation Average\t |\t   "<<stud[j].mrecitationave<<"%\t  |";
cout<<"\n\t\t\t+------------------------+------------------------+";
SetConsoleTextAttribute(color,14);
cout<<"\n\t\t\t\t      [Finalterm Grade Record]";
SetConsoleTextAttribute(color,15);
cout<<"\n\t\t\t+------------------------+------------------------+";
cout<<"\n\t\t\t|\t Catergory"<<"\t |\t   Average \t  |";
cout<<"\n\t\t\t+------------------------+------------------------+";
cout<<"\n\t\t\t|   Quiz Average\t |\t   "<<stud[j].fquizave<<"%\t  |";
cout<<"\n\t\t\t|   Assignment Average\t |\t   "<<stud[j].fassave<<"%\t  |";
cout<<"\n\t\t\t|   Attendance Average\t |\t   "<<stud[j].fattave<<"%\t  |";
cout<<"\n\t\t\t|   Midterm Exam Average |\t   "<<stud[j].fexamave<<"%\t  |";
cout<<"\n\t\t\t|   Project Average\t |\t   "<<stud[j].fprojectave<<"%\t  |";
cout<<"\n\t\t\t|   Recitation Average\t |\t   "<<stud[j].frecitationave<<"%\t  |";
cout<<"\n\t\t\t+------------------------+------------------------+";
cout<<"\n\t\t\t\t\t Final Average = "<<stud[j].finalgrade<<"%";
SetConsoleTextAttribute(color,14);
if (stud[j].finalgrade>=98 && stud[j].finalgrade<=100)
{
cout<<"\n\t\t\t\t\t      PASSED "<<"1.00";
}
else if (stud[j].finalgrade>=95 && stud[j].finalgrade<=97)
{
cout<<"\n\t\t\t\t\t      PASSED "<<"1.25";
}
else if (stud[j].finalgrade>=92 && stud[j].finalgrade<=94)
{
cout<<"\n\t\t\t\t\t      PASSED "<<"1.50";
}
else if (stud[j].finalgrade>=89 && stud[j].finalgrade<=91)
{
cout<<"\n\t\t\t\t\t      PASSED "<<"1.75";
}
else if (stud[j].finalgrade>=86 && stud[j].finalgrade<=88)
{
cout<<"\n\t\t\t\t\t      PASSED "<<"2.00";
}
else if (stud[j].finalgrade>=83 && stud[j].finalgrade<=85)
{
cout<<"\n\t\t\t\t\t      PASSED "<<"2.25";
}
else if (stud[j].finalgrade>=80 && stud[j].finalgrade<=82)
{
cout<<"\n\t\t\t\t\t      PASSED "<<"2.25";
}
else if (stud[j].finalgrade>=78 && stud[j].finalgrade<=79)
{
cout<<"\n\t\t\t\t\t      PASSED "<<"2.50";
}
else if (stud[j].finalgrade>=76 && stud[j].finalgrade<=77)
{
cout<<"\n\t\t\t\t\t      PASSED "<<"2.75";
}
else if (stud[j].finalgrade>=75)
{
cout<<"\n\t\t\t\t\t      PASSED "<<"3.00";
}
else 
{
SetConsoleTextAttribute(color,12);
cout<<"\n\t\t\t\t\t      FAILED "<<"5.00";
}
SetConsoleTextAttribute(color,15);
   }}studentno-=1;    
            break;
case 5:
for(int k=0;k<arr;k++)
{
    if (stud[k].recordno!='d')
    {
    cout<<fixed<<showpoint;
    cout<<setprecision(2);
    SetConsoleTextAttribute(color,15);
cout<<"\n\t\tRecordno: "<<stud[k].recordno;
cout<<"\n\t\tStudent no = 19-0"<<stud[k].studno;
cout<<"\n\t\tLast Name: "<<stud[k].Lname;
cout<<"\n\t\tFirst Name: "<<stud[k].Fname;
cout<<"\n\t\tMiddle Name: "<<stud[k].Mname;
cout<<"\n\t\tCourse: "<<stud[k].course;
cout<<"\n\t\tYear Level: "<<stud[k].yearlevel;
SetConsoleTextAttribute(color,14);
cout<<"\n\t\t\t\t       [Midterm Grade Record]";
SetConsoleTextAttribute(color,15);
cout<<"\n\t\t\t+------------------------+------------------------+";
cout<<"\n\t\t\t|\t Catergory"<<"\t |\t   Average \t  |";
cout<<"\n\t\t\t+------------------------+------------------------+";
cout<<"\n\t\t\t|   Quiz Average\t |\t   "<<stud[k].mquizave<<"%\t  |";
cout<<"\n\t\t\t|   Assignment Average\t |\t   "<<stud[k].massave<<"%\t  |";
cout<<"\n\t\t\t|   Attendance Average\t |\t   "<<stud[k].mattave<<"%\t  |";
cout<<"\n\t\t\t|   Midterm Exam Average |\t   "<<stud[k].mexamave<<"%\t  |";
cout<<"\n\t\t\t|   Project Average\t |\t   "<<stud[k].mprojectave<<"%\t  |";
cout<<"\n\t\t\t|   Recitation Average\t |\t   "<<stud[k].mrecitationave<<"%\t  |";
cout<<"\n\t\t\t+------------------------+------------------------+";
SetConsoleTextAttribute(color,14);
cout<<"\n\t\t\t\t      [Finalterm Grade Record]";
SetConsoleTextAttribute(color,15);
cout<<"\n\t\t\t+------------------------+------------------------+";
cout<<"\n\t\t\t|\t Catergory"<<"\t |\t   Average \t  |";
cout<<"\n\t\t\t+------------------------+------------------------+";
cout<<"\n\t\t\t|   Quiz Average\t |\t   "<<stud[k].fquizave<<"%\t  |";
cout<<"\n\t\t\t|   Assignment Average\t |\t   "<<stud[k].fassave<<"%\t  |";
cout<<"\n\t\t\t|   Attendance Average\t |\t   "<<stud[k].fattave<<"%\t  |";
cout<<"\n\t\t\t|   Midterm Exam Average |\t   "<<stud[k].fexamave<<"%\t  |";
cout<<"\n\t\t\t|   Project Average\t |\t   "<<stud[k].fprojectave<<"%\t  |";
cout<<"\n\t\t\t|   Recitation Average\t |\t   "<<stud[k].frecitationave<<"%\t  |";
cout<<"\n\t\t\t+------------------------+------------------------+";
cout<<"\n\t\t\t\t\t Final Average = "<<stud[k].finalgrade<<"%";
SetConsoleTextAttribute(color,14);
if (stud[k].finalgrade>=98 && stud[k].finalgrade<=100)
{
cout<<"\n\t\t\t\t\t      PASSED "<<"1.00";
}
else if (stud[k].finalgrade>=95 && stud[k].finalgrade<=97)
{
cout<<"\n\t\t\t\t\t      PASSED "<<"1.25";
}
else if (stud[k].finalgrade>=92 && stud[k].finalgrade<=94)
{
cout<<"\n\t\t\t\t\t      PASSED "<<"1.50";
}
else if (stud[k].finalgrade>=89 && stud[k].finalgrade<=91)
{
cout<<"\n\t\t\t\t\t      PASSED "<<"1.75";
}
else if (stud[k].finalgrade>=86 && stud[k].finalgrade<=88)
{
cout<<"\n\t\t\t\t\t      PASSED "<<"2.00";
}
else if (stud[k].finalgrade>=83 && stud[k].finalgrade<=85)
{
cout<<"\n\t\t\t\t\t      PASSED "<<"2.25";
}
else if (stud[k].finalgrade>=80 && stud[k].finalgrade<=82)
{
cout<<"\n\t\t\t\t\t      PASSED "<<"2.25";
}
else if (stud[k].finalgrade>=78 && stud[k].finalgrade<=79)
{
cout<<"\n\t\t\t\t\t      PASSED "<<"2.50";
}
else if (stud[k].finalgrade>=76 && stud[k].finalgrade<=77)
{
cout<<"\n\t\t\t\t\t      PASSED "<<"2.75";
}
else if (stud[k].finalgrade>=75)
{
cout<<"\n\t\t\t\t\t      PASSED "<<"3.00";
}
else 
{
SetConsoleTextAttribute(color,12);
cout<<"\n\t\t\t\t\t      FAILED "<<"5.00";
}
SetConsoleTextAttribute(color,15);
cout<<"\n\t_________________________________________________________________________________\n";
    }
}
        break;
        case 6:
        int rank;
        cout<<fixed<<showpoint;
    cout<<setprecision(2);
        SetConsoleTextAttribute(color,15);
        cout<<"\t +------+-----------+------------------------------------+---------------+----------+\n";
        cout<<setw(15)<<"Rank";
cout<<setw(12)<<"StudentNo";
cout<<setw(22)<<"Name";
cout<<setw(31)<<"Course & Year";
cout<<setw(9)<<"Grade"<<endl;
       
        cout<<"\t +------+-----------+------------------------------------+---------------+----------+\n";
        for (int k=0; k<arr; k++)
        {
        rank=k+1;
if(rank<=10)
{
        cout<<right<<setw(13)<<rank;
cout<<right<<setw(11)<<"19-0"<<stud[k].studno;
cout<<right<<setw(18)<<stud[k].Fname;
cout<<right<<setw(10)<<stud[k].Mname;
cout<<right<<setw(10)<<stud[k].Lname;
cout<<right<<setw(12)<<stud[k].course<<"-"<<stud[k].yearlevel;
cout<<right<<setw(12)<<stud[k].finalgrade<<"%"<<endl;
}
}
cout<<"\t +------+-----------+------------------------------------+---------------+----------+\n";
        break;
    default:
    SetConsoleTextAttribute(color,12);
    cout<<"\n\t\t\t\t      Wrong option Selected ";
}
repeat:
SetConsoleTextAttribute(color,15);
cout<<"\n \n \t\t Do You want to Continue Again [Y/N] = ";
cin>>let;
}
while(let=='y' || let=='Y');
if(let=='n' || let=='N')
{
SetConsoleTextAttribute(color,12);
cout<<"\n\t\t\t\t    [End of the Program]";
SetConsoleTextAttribute(color,15);
}
   return 0;
}

Centimeter into Meter and Kilometer Converter Pseudocode and Flowchart

Programming Problem

Write pseudocode and flowchart to input length in centimeter and convert it to meter and kilometer and display the result on the screen.

Pseudocode

Start
    Declare Real cm, meter, km
    Output "Centimeter into Meter and Kilometer Converter"
    Output "Give Length in Centimeter:"
    Input cm
    Assign meter = cm / 100.0
    Assign km = cm / 100000.0
    Output "Length in Meter = " &tofixed(meter,2) &" m."
    Output "Length in Kilometer = " &tofixed(km,2)&" km."
End



Flowchart of  Centimeter into Meter and Kilometer Converter

Seconds to Hours, Minutes and Seconds Converter Pseudocode and Flowchart

Programming Problem

Write pseudocode and flowchart to convert a given integer (in seconds) to hours, minutes and seconds.


Pseudocode

Start
    Declare Integer sec, h, m, s
     Output "Seconds to Hours, Minutes and Seconds Converter"
    Output "Give value in seconds"
    Input sec
    Assign h = (sec/3600)
    Assign m = (sec -(3600*h))/60
    Assign s = (sec -(3600*h)-(m*60))
    Output "The equivalent is " & h & " Hour " & m & " Minutes " &  s &" Seconds."
Stop



Flowchart  of Seconds to Hours, Minutes and Seconds Converter 

Payroll System Pseudocode, Algorithm and Flowchart

Programming Problem

Create pseudocode and flowchart that will ask the user to give employees name, position, 
number of days work and rate per day and then solve the salary of the employee and 
display the result on the screen.

Pseudocode

Start
    Declare String name, position
    Declare Real dayswork, rateperday, salary
     Output "Give Employee's Name"
    Input name
    Output "Give Employee's Position"
    Input position
    Output "Give Employee's Number of Days Work"
    Input dayswork
    Output "Give Employee's Daily Rate"
    Input rateperday
    Assign salary = (dayswork * rateperday)
    Output "Hi " &name & "being an " & position & " your salary is PHP " & tofixed(salary,2) & "."
Stop


Algorithm

Step 1: Start
Step 2: Declare variables name, position,dayswork
        Declare variables rateperday, salary
Step 3: Input Employee's Name says name
        Input Employee's Position says position
        Input Employee's Number of Days Work say dayswork
        Input Employee's Daily Rate say rateperday
Step 4: salary = (dayswork * rateperday)
Step 5: Display employee's name, position, salary
Step 6: Stop



Payroll System Flowchart


Average Grade Solver Pseudocode, Algorithms ad Flowchart

Programming Problem 

Create pseudocode and flowchart that generates an average of three grading system
such as prelim, midterm and final period and display the result on the screen.


Pseudocode

    Declare Integer prelim, midterm, finals
    Declare Real average
    
    Output "Average Grade Solver"
    Output "Give Prelim Grade"
    Input prelim
    Output "Give Midterm Grade"
    Input midterm
    Output "Give Final Grade"
    Input finals
    Assign average = (prelim+midterm+finals)/3
    Output "The General Average Grade is " & Tofixed(average,2) & "."


Algorithm

  Step 1: Start
  Step 2: Declare variables prelim, midterm, finals, average
  Step 3: Input Prelim Grade says prelim
          Input Midterm Grade says midterm
          Input Final  Grade says finals
  Step 4: average = (prelim+midterm+finals)/3
  Step 5: Display average
  Step 6: Stop



Flowchart of Average Grade Solver




Area of the Circle Solver Pseudocode, Algorithms, and Flowchart

Programming Problem

Design and create pseudocode and flowchart that will ask the user to give the radius of the circle and then the program will compute the area of the circle and display the result on the screen.

Pseudocode

Start
    Declare Real radius, area, pie
     Assign pie = 3.1416
    Output "Area of the Circle Solver"
    Output "Give the radius of Circle :"
    Input radius
    Assign area = (pie * radius * radius)
    Output "The Area of Circle is " & ToFixed(area,2) & "."
    Output "End of Program"
Stop


Algorithm

step 1: Start
Step 2: Declare variables radius, area, pie
Step 3: Input Radius say radius
Step 4: area = (pie * radius * radius)
Step 5: Display area
Step 6: Stop



Flowchart of Area of the Circle Solver



Wednesday, October 9, 2019

Fahrenheit To Celsius Converter Pseudocode, Algorithm and Flowchart

Programming Problem

Create and design pseudocode and flowchart that will ask the user to give the temperature in Fahrenheit and then convert the given temperature into Celsius equivalent and display the result on the screen.


Pseudocode

Start
   Declare Real celsius, fahrenheit
    Output "Temperature Converter"
    Output "Give the temperature in Fahrenheit  :"
    Input fahrenheit
    Assign celsius = (fahrenheit-32) * 5 / 9
    Output "The temperature in Celsius is " & tofixed(celsius,2) &"°C."
    Output "END OF PROGRAM"
Stop


Algorithm

Step 1: Start
Step 2: Declare variables celsius, fahrenheit
Step 3: Input temperature in Fahrenheit say fahrenheit
Step 4: celsius = 5.0/9.0 (fahrenheit - 32 )
Step 5: Display celsius
Step 6: Stop



Sample Program Output


I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.







Sum of Two Numbers Pseudocode, Algorithm and Flowchart

Programming Problem

Write pseudocode and flowchart to find the sum of two numbers.

Pseudocode

Start
    Declare Integer a, b, sum
     Output "Sum of Two Numbers"
    Input a
    Input b
    Assign sum = a+b
    Output "The total sum of " & a & " and " & b & " is " & sum &"."
Stop


Algorithm

Step 1: Start
Step 2: Declare variables A,B,SUM
Step 3: Input two numbers say A and B
Step 4: SUM = A + B
Step 5: Display SUM
Step 6: Stop


Flowchart of Sum of Two Numbers


I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com.

Sum of Odd and Even Numbers Flowchart, Algorithms and Pseudocodes

Programming Problem

Write and design pseudocode and flowchart that takes the number N and finds the sum of odd and even numbers from 1 to N and display the result on the screen.

Pseudocode

Start
    Declare Integer i, num, oddsum, evensum
    
    Assign oddsum = 0
    Assign evensum = 0
    Output "Sum of Odd and Even Numbers"
    Output "Give the value of num :"
    Input num
    For i = 1 to num
        If i % 2 = 0
            Assign evensum = evensum + i
        False:
            Assign oddsum = oddsum + i
        End
    End
    Output "Sum of all even numbers  = " & evensum &"."
    Output "Sum of all odd numbers  = " & oddsum &"."
End
Stop

Algorithm

Step 1: Start
Step 2: Declare variables i, num, oddsum, evensum
Step 3: Input a value say num
Step 4: FOR i = 1 TO num
        IF i % 2 = 0
        evensum = evensum + i
        ELSE
         oddsum = oddsum + i
       ENDIF
Step 5: DISPLAY evensum
        DISPLAY oddsum
Step 6: END


Flowchart of Sum of Odd and Even Numbers


I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com.

Power of a Number Flowchart, Algorithm and Pseudocode

Programming Problem

Design and create pseudocode and flowchart that will ask the user to give base and exponent values
and then the  program will compute the power value of the number and then display the 
the result on the screen.


Pseudocode

Start
    Declare Integer base, exponent, a, num
    Output "Power of a Number"
    Assign num = 1
    Output "Give Base Value"
    Input base
    Output "Give Exponent Value"
    Input exponent
    For a = 1 to exponent
        Assign num = num * base
    End
    Output base & " ^ "& exponent & " = " & num
Stop

Algorithm

Step 1: Start
Step 2: Declare variables base, exponent,a, num
Step 3: Input Base Value Say base
Step 4: Input Exponent Value Say exponent
Step 5: FOR a = 1 TO exponent
         num = num * base
Step 6: Display base,exponent,num
Step 7: Stop


Flowchart of Power of a Number


I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com.



Check Prime Number in C

A simple in C programming to ask the user to give a number and then it will check if the given number is a prime number or not.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com.


Program Listing

prime.c

#include <stdio.h>

main( )
{
int   num, i ;

printf ( "Enter a number " ) ;
scanf ( "%d", &num ) ;

i = 2 ;
while ( i <= num - 1 )
{
if ( num % i == 0 )
{
printf ( "Not a prime number" ) ;
break ;
}
i++ ;
}

if ( i == num )
printf ( "Prime number" ) ;

}

Login and Registration System in Visual Basic NET and Microsoft Access

Here is a sample program that is being provided by my close friend, business partner and fellow software engineer Sir Larry Dave Emol.

 Login and Registration System in Visual Basic NET and Microsoft Access

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com.



Sample Program Output




Ason Gallego's Gown Transaction System in Microsoft Visual Basic 6 and Microsoft Access

Here is a sample program that is being provided by my close friend, business partner and fellow software engineer Sir Larry Dave Emol.

Ason Gallego's Gown Transaction System in Microsoft Visual Basic 6 and Microsoft Access.

These are the following features of the system
Add/Delete/Update Dresses All Occasion
Add/Delete/Update Accessories
Manage Record Rent/Sales/Due Date/Balances
Manage Clients
Add/Delete/Update User Account
Print Report Due Date/ Sales/Rent Accessories and Dresses 

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com.



Sample Program Output