GPA CALCULATOR MADE BY ME

PROGRAM

#include<iostream>
#include<stdio.h>
#include <conio.h>
#include<windows.h>
#include<conio.h>
struct course
{
char cname[11];
int ch;
float gpa;
};
struct student
{
char sname[7];
char sroll[36];
int sem;
course scourses[6];
float sgpa;
};
student s1;
 using namespace std;
 void gotoxy(short x, short y){
HANDLE Manipulador;
COORD Coordenadas;
Manipulador=GetStdHandle(STD_OUTPUT_HANDLE);
Coordenadas.X=x;
Coordenadas.Y=y;
SetConsoleCursorPosition(Manipulador,Coordenadas);
}
int main(){
system("color 2F");
    cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t\t\t\t\b\b\bKICSIT ";
cout<<"\n\n\t\t\t\t\t\t\t\t\b\bGPA";
cout<<"\n\n\t\t\t\t\t\t\t\t\b\b\b\b\b\bCalculator ";
Sleep(200);
Beep(800,500);
system("cls");
int sch=0;
float sp = 0.0;
system("color 07");
cout<<"\n\n\t\t\t\t \tKICSIT GPA Calculator"<<endl;
cout<<endl<<"your name plz "; cin>>s1.sname;
cout<<endl<<"Roll#";cin>>s1.sroll;
cout<<endl<<"Semister:";cin>>s1.sem;
cout<<endl<<"Enter detail of course:";
for(int i=1;i<=5;i++)
{
cout<<endl<<"Name of "<<i<<" course "; cin>> s1.scourses[i].cname;
cout<<endl<<"Credit Hourse of "<<i<<" course "; cin>>s1.scourses[i].ch;
cout<<endl<<"GPA in "<<i<<" course "; cin>>s1.scourses[i].gpa;
sch += s1.scourses[i].ch;
sp += (s1.scourses[i].ch * s1.scourses[i].gpa);
}
s1.sgpa = sp/sch;
//cout<<endl<<" Mr/Miss "<< s1.sname <<", your SGPA = "<< s1.sgpa;
system("cls");
system("color 2");
char a=177 ,b=219;
cout<<"\n\n\n\t\t\t\tGENERATING REPORT.....";
cout<<"\n\n\n";
cout<<"\t\t\t\t";
for(int i=0;i<=25;i++)
cout<<a;
Sleep(200);
cout<<"\r";
cout<<"\t\t\t\t";
for(int i=0;i<=25;i++){
cout<<b;
Sleep(200);
}
system("cls");
system("color 2");
for(int i=0;i<81;i++)
cout<<char(219);
gotoxy(4,2);
cout<<"Dr. A. Q. Khan Institute of Computer Sciences and Information Technology\n"<<endl;
gotoxy(3,5);
cout<<"Name:"<<s1.sname<<endl;
cout<<"   Roll#:"<<s1.sroll<<endl;
cout<<"   Semister:"<<s1.sem<<endl;
for(int i=0;i<80;i++)
cout<<char(219);
for(int i=1;i<25;i++)
{
gotoxy(0,i);
cout<<char(219);
}
for(int i=8;i<25;i++)
{
gotoxy(35,i);
cout<<char(219);
}
for(int i=11;i<=15;i++)
{
gotoxy(4,i+1);
//cout<<i-10<<"-"<<"d";
cout<<i-10<<"-"<<s1.scourses[i-10].cname;
}
for(int i=1;i<25;i++)
{
gotoxy(80,i);
cout<<char(219);
}
for(int i=8;i<25;i++)
{
gotoxy(45,i);
cout<<char(219);
}
for(int i=11;i<=15;i++)
{
gotoxy(40,i+1);
//cout<<"d";
cout<<s1.scourses[i-10].ch;
}
for(int i=11;i<=15;i++)
{
gotoxy(59,i+1);
//cout<<"d";
cout<<s1.scourses[i-10].gpa;
}
gotoxy(1,20);
for(int i=0;i<80;i++)
cout<<char(219);
for(int i=23;i<24;i++)
{
gotoxy(65,i);
cout<<"SGPA = "<< s1.sgpa;
}
gotoxy(1,24);
for(int i=0;i<80;i++)
cout<<char(219);
}


Comments

Popular posts from this blog

Stack

Operation on Single Linked List

EXTRA INFORMATION ABOUT TECHNOLOGY