===========================================================================
CODING
#include<all.h>
#include<iomanip.h>
void main()
{
clrscr();
float m1,m2,m3,m4,m5,P,c,g1,g2,g3,g4,g5,t;
int t1,t2,t3,t4,t5;
char *n,*r;
cout<<"Enter your Name: ";
gets(n);
gotoxy(35,3);
cout<<"--------------";
gotoxy(35,4);
cout<<"| CLASS : |";
gotoxy(35,5);
cout<<"--------------";
gotoxy(35,6);
cout<<"| SUB. | Mar.|";
gotoxy(35,7);
cout<<"|------------|";
gotoxy(35,8);
cout<<"| MATHS: |";
gotoxy(35,9);
cout<<"| C++ : |";
gotoxy(35,10);
cout<<"| ENG.: |";
gotoxy(35,11);
cout<<"| PHY.: |";
gotoxy(35,12);
cout<<"| CHEM.: |";
gotoxy(35,13);
cout<<"--------------";
gotoxy(45,4);
cin>>c;
gotoxy(44,8);
cin>>m1;
gotoxy(44,9);
cin>>m2;
gotoxy(44,10);
cin>>m3;
gotoxy(44,11);
cin>>m4;
gotoxy(44,12);
cin>>m5;
clrscr();
P=(m1+m2+m3+m4+m5)/5;
if(m1>=0 && m1<36)
g1=0;
else if(m1>=36 && m1<66)
g1=5;
else if(m1>=66 && m1<81)
g1=3;
else if(m1>=81 && m1<96)
g1=1;
else if(m1>=95 && m1<101)
g1=0;
if(m2>=0 && m2<36)
g2=0;
else if(m2>=36 && m2<66)
g2=5;
else if(m2>=66 && m2<81)
g2=3;
else if(m2>=81 && m2<96)
g2=1;
else if(m2>=95 && m2<101)
g2=0;
if(m3>=0 && m3<36)
g3=0;
else if(m3>=36 && m3<66)
g3=5;
else if(m3>=66 && m3<81)
g3=3;
else if(m3>=81 && m3<96)
g3=1;
else if(m3>=95 && m3<101)
g3=0;
if(m4>=0 && m4<36)
g4=0;
else if(m4>=36 && m4<66)
g4=5;
else if(m4>=66 && m4<81)
g4=3;
else if(m4>=81 && m4<96)
g4=1;
else if(m4>=95 && m4<101)
g4=0;
if(m5>=0 && m5<36)
g5=0;
else if(m5>=36 && m5<66)
g5=5;
else if(m5>=66 && m5<81)
g5=3;
else if(m5>=81 && m5<96)
g5=1;
else if(m5>=95 && m5<101)
g5=0;
t1=m1+g1/m1*100;
t2=m2+g2/m2*100;
t3=m3+g3/m3*100;
t4=m4+g4/m4*100;
t5=m5+g5/m5*100;
t=t1+t2+t3+t4+t5;
if(P>=0 && P<36)
strcpy(r,"Fail!");
else if(P>=36 && P<61)
strcpy(r,"Pass");
else if(P>=61 && P<76)
strcpy(r,"Third");
else if(P>=76 && P<86)
strcpy(r,"Second");
else if(P>=86 && P<96)
strcpy(r,"First");
else if(P>=96 && P<101)
strcpy(r,"Excellent");
t=m1+m2+m3+m4+m5;
gotoxy(25,4);
cout<<"********************************";
gotoxy(25,5);
cout<<"* Name: Class: *";
gotoxy(25,6);
cout<<"*------------------------------*";
gotoxy(25,7);
cout<<"* Sub. | Mark | Grace | Total *";
gotoxy(25,8);
cout<<"*-------|------|-------|-------*";
gotoxy(25,9);
cout<<"* MATHS | | | *";
gotoxy(25,10);
cout<<"* ENG. | | | *";
gotoxy(25,11);
cout<<"* CHEM. | | | *";
gotoxy(25,12);
cout<<"* PHY. | | | *";
gotoxy(25,13);
cout<<"* C++ | | | *";
gotoxy(25,14);
cout<<"*------------------------------*";
gotoxy(25,15);
cout<<"* Total: Per.: *";
gotoxy(25,16);
cout<<"*------------------------------*";
gotoxy(25,17);
cout<<"* Result: *";
gotoxy(25,18);
cout<<"********************************";
gotoxy(34,5);
cout<<n;
gotoxy(52,5);
cout<<c;
gotoxy(35,9);
cout<<m1;
gotoxy(42,9);
cout<<g1<<"%";
gotoxy(50,9);
cout<<t1;
gotoxy(35,10);
cout<<m2;
gotoxy(42,10);
cout<<g2<<"%";
gotoxy(50,10);
cout<<t2;
gotoxy(35,11);
cout<<m3;
gotoxy(42,11);
cout<<g3<<"%";
gotoxy(50,11);
cout<<t3;
gotoxy(35,12);
cout<<m4;
gotoxy(42,12);
cout<<g4<<"%";
gotoxy(50,12);
cout<<t4;
gotoxy(35,13);
cout<<m5;
gotoxy(42,13);
cout<<g5<<"%";
gotoxy(50,13);
cout<<t5;
gotoxy(38,15);
cout<<t;
gotoxy(51,15);
cout<<setprecision(2)<<P<<"%";
gotoxy(44,17);
cout<<r;
getch();
}
CODING
#include<all.h>
#include<iomanip.h>
void main()
{
clrscr();
float m1,m2,m3,m4,m5,P,c,g1,g2,g3,g4,g5,t;
int t1,t2,t3,t4,t5;
char *n,*r;
cout<<"Enter your Name: ";
gets(n);
gotoxy(35,3);
cout<<"--------------";
gotoxy(35,4);
cout<<"| CLASS : |";
gotoxy(35,5);
cout<<"--------------";
gotoxy(35,6);
cout<<"| SUB. | Mar.|";
gotoxy(35,7);
cout<<"|------------|";
gotoxy(35,8);
cout<<"| MATHS: |";
gotoxy(35,9);
cout<<"| C++ : |";
gotoxy(35,10);
cout<<"| ENG.: |";
gotoxy(35,11);
cout<<"| PHY.: |";
gotoxy(35,12);
cout<<"| CHEM.: |";
gotoxy(35,13);
cout<<"--------------";
gotoxy(45,4);
cin>>c;
gotoxy(44,8);
cin>>m1;
gotoxy(44,9);
cin>>m2;
gotoxy(44,10);
cin>>m3;
gotoxy(44,11);
cin>>m4;
gotoxy(44,12);
cin>>m5;
clrscr();
P=(m1+m2+m3+m4+m5)/5;
if(m1>=0 && m1<36)
g1=0;
else if(m1>=36 && m1<66)
g1=5;
else if(m1>=66 && m1<81)
g1=3;
else if(m1>=81 && m1<96)
g1=1;
else if(m1>=95 && m1<101)
g1=0;
if(m2>=0 && m2<36)
g2=0;
else if(m2>=36 && m2<66)
g2=5;
else if(m2>=66 && m2<81)
g2=3;
else if(m2>=81 && m2<96)
g2=1;
else if(m2>=95 && m2<101)
g2=0;
if(m3>=0 && m3<36)
g3=0;
else if(m3>=36 && m3<66)
g3=5;
else if(m3>=66 && m3<81)
g3=3;
else if(m3>=81 && m3<96)
g3=1;
else if(m3>=95 && m3<101)
g3=0;
if(m4>=0 && m4<36)
g4=0;
else if(m4>=36 && m4<66)
g4=5;
else if(m4>=66 && m4<81)
g4=3;
else if(m4>=81 && m4<96)
g4=1;
else if(m4>=95 && m4<101)
g4=0;
if(m5>=0 && m5<36)
g5=0;
else if(m5>=36 && m5<66)
g5=5;
else if(m5>=66 && m5<81)
g5=3;
else if(m5>=81 && m5<96)
g5=1;
else if(m5>=95 && m5<101)
g5=0;
t1=m1+g1/m1*100;
t2=m2+g2/m2*100;
t3=m3+g3/m3*100;
t4=m4+g4/m4*100;
t5=m5+g5/m5*100;
t=t1+t2+t3+t4+t5;
if(P>=0 && P<36)
strcpy(r,"Fail!");
else if(P>=36 && P<61)
strcpy(r,"Pass");
else if(P>=61 && P<76)
strcpy(r,"Third");
else if(P>=76 && P<86)
strcpy(r,"Second");
else if(P>=86 && P<96)
strcpy(r,"First");
else if(P>=96 && P<101)
strcpy(r,"Excellent");
t=m1+m2+m3+m4+m5;
gotoxy(25,4);
cout<<"********************************";
gotoxy(25,5);
cout<<"* Name: Class: *";
gotoxy(25,6);
cout<<"*------------------------------*";
gotoxy(25,7);
cout<<"* Sub. | Mark | Grace | Total *";
gotoxy(25,8);
cout<<"*-------|------|-------|-------*";
gotoxy(25,9);
cout<<"* MATHS | | | *";
gotoxy(25,10);
cout<<"* ENG. | | | *";
gotoxy(25,11);
cout<<"* CHEM. | | | *";
gotoxy(25,12);
cout<<"* PHY. | | | *";
gotoxy(25,13);
cout<<"* C++ | | | *";
gotoxy(25,14);
cout<<"*------------------------------*";
gotoxy(25,15);
cout<<"* Total: Per.: *";
gotoxy(25,16);
cout<<"*------------------------------*";
gotoxy(25,17);
cout<<"* Result: *";
gotoxy(25,18);
cout<<"********************************";
gotoxy(34,5);
cout<<n;
gotoxy(52,5);
cout<<c;
gotoxy(35,9);
cout<<m1;
gotoxy(42,9);
cout<<g1<<"%";
gotoxy(50,9);
cout<<t1;
gotoxy(35,10);
cout<<m2;
gotoxy(42,10);
cout<<g2<<"%";
gotoxy(50,10);
cout<<t2;
gotoxy(35,11);
cout<<m3;
gotoxy(42,11);
cout<<g3<<"%";
gotoxy(50,11);
cout<<t3;
gotoxy(35,12);
cout<<m4;
gotoxy(42,12);
cout<<g4<<"%";
gotoxy(50,12);
cout<<t4;
gotoxy(35,13);
cout<<m5;
gotoxy(42,13);
cout<<g5<<"%";
gotoxy(50,13);
cout<<t5;
gotoxy(38,15);
cout<<t;
gotoxy(51,15);
cout<<setprecision(2)<<P<<"%";
gotoxy(44,17);
cout<<r;
getch();
}
===========================================================================
No comments:
Post a Comment