Solution of 1040 number !
please do not copy it rather watch it for learning purpose :)
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main ()
{
double a,b,c,d;
cin >> a >> b >> c >> d;
a=(a*2+b*3+4*c+1*d)/10.0;
if(a>=5.00&&a<7.0)
{
cout << "Media: "<<fixed <<setprecision(1)<<a<<endl<<"Aluno em exame."<<endl;
double e;
cin >> e;
cout << "Nota do exame: "<<fixed <<setprecision(1)<<e<<endl;
a=(a+e)/2.0;
if(a>=5.00)
{
cout <<"Aluno aprovado."<<endl<<"Media final: "<<fixed <<setprecision(1)<<a<<endl;
}
else
{
cout <<"Aluno reprovado."<<endl<<"Media final: "<<fixed <<setprecision(1)<<a<<endl;
}
}
else
{
if(a<5.00)
{
cout << "Media: "<<fixed <<setprecision(1)<<a<<endl<<"Aluno reprovado."<<endl;
}
else cout << "Media: "<<fixed <<setprecision(1)<<a<<endl<<"Aluno aprovado."<<endl;
}
return 0;
}
If you do not understand please leave a message here.
or mail us mechaboo786@gmail.com
or you can leave a message at fb . Link :- https://www.facebook.com/mechaboo/
please do not copy it rather watch it for learning purpose :)
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main ()
{
double a,b,c,d;
cin >> a >> b >> c >> d;
a=(a*2+b*3+4*c+1*d)/10.0;
if(a>=5.00&&a<7.0)
{
cout << "Media: "<<fixed <<setprecision(1)<<a<<endl<<"Aluno em exame."<<endl;
double e;
cin >> e;
cout << "Nota do exame: "<<fixed <<setprecision(1)<<e<<endl;
a=(a+e)/2.0;
if(a>=5.00)
{
cout <<"Aluno aprovado."<<endl<<"Media final: "<<fixed <<setprecision(1)<<a<<endl;
}
else
{
cout <<"Aluno reprovado."<<endl<<"Media final: "<<fixed <<setprecision(1)<<a<<endl;
}
}
else
{
if(a<5.00)
{
cout << "Media: "<<fixed <<setprecision(1)<<a<<endl<<"Aluno reprovado."<<endl;
}
else cout << "Media: "<<fixed <<setprecision(1)<<a<<endl<<"Aluno aprovado."<<endl;
}
return 0;
}
If you do not understand please leave a message here.
or mail us mechaboo786@gmail.com
or you can leave a message at fb . Link :- https://www.facebook.com/mechaboo/
Comments
Post a Comment