alguien podria decirme que estoy haciendo mal? necesito me imprima la nota final A,B,C,D,F
Publicado por Luis Angel (5 intervenciones) el 18/08/2019 08:40:28
#include <iostream>
#include<stdlib.h>
#include<math.h>
using namespace std;
int main(int argc, char* argv[])
{
int N1,N2,N3,N4,N5,N6,P1,P2,P3,P4,P5,P6,PO1, PO2, PO3,PO4, PO5, PO6, PO7;//declaracion de variable
cout<<"ingrese Nota1: "<<endl;
cin>>N1;
P1 = 15;
PO1 = N1*P1/100;
cout<<"ingrese Nota2: "<<endl;
cin>>N2;
P2 = 15;
PO2 =N2*P2/100;
cout<<"ingrese Asistencia: "<<endl;
cin>>N3;
P3 = 10;
PO3 = N3*P3/100;
cout<<"ingrese Tarea/Investigaciones: "<<endl;
cin>>N4;
P4 = 10;
PO4 = N4*P4/100;
cout<<"ingrese programa: "<<endl;
cin>>N5;
P5 = 20;
PO5 = N5*P5/100;
cout<<"ingrese Proyecto final: "<<endl;
cin>>N6;
P6 = 30;
PO6 = N6*P6/100;
PO7= PO1+PO2+PO3+PO4+PO5+PO6;
int main
(int PO7,int A,int B,int C,int D,int F)
if (PO7 => 100 || PO7 <= 91)
cout << "Nota Final: A" <<A<<endl;
else return B;
while(PO7 < 100 || PO7 >= 91);
if(PO7 < 90 || PO7 >= 81)
cout << "Nota Final: B" <<B<< endl;
else return C;
while(PO7 < 90 || PO7 >= 81);
{
if(PO7 < 80 || PO7 >= 71)
cout << "Nota Final: C" <<C<<endl;
else return D;
}
while(PO7 < 80 || PO7 >= 71);
{
if(PO7 < 70 || PO7 >= 61)
cout << "Nota Final: D" << D<< endl;
else return F;
}
while(PO7 < 70 || PO7 >= 61);
{
if(PO7 < 60 || PO7 >= 0)
cout << "Nota Final: F" << endl;
}
while(PO7 < 60 || PO7 >= 0);
cout<<"Muchas gracias y felices Vacaciones"<<endl;
return 0;
}
#include<stdlib.h>
#include<math.h>
using namespace std;
int main(int argc, char* argv[])
{
int N1,N2,N3,N4,N5,N6,P1,P2,P3,P4,P5,P6,PO1, PO2, PO3,PO4, PO5, PO6, PO7;//declaracion de variable
cout<<"ingrese Nota1: "<<endl;
cin>>N1;
P1 = 15;
PO1 = N1*P1/100;
cout<<"ingrese Nota2: "<<endl;
cin>>N2;
P2 = 15;
PO2 =N2*P2/100;
cout<<"ingrese Asistencia: "<<endl;
cin>>N3;
P3 = 10;
PO3 = N3*P3/100;
cout<<"ingrese Tarea/Investigaciones: "<<endl;
cin>>N4;
P4 = 10;
PO4 = N4*P4/100;
cout<<"ingrese programa: "<<endl;
cin>>N5;
P5 = 20;
PO5 = N5*P5/100;
cout<<"ingrese Proyecto final: "<<endl;
cin>>N6;
P6 = 30;
PO6 = N6*P6/100;
PO7= PO1+PO2+PO3+PO4+PO5+PO6;
int main
(int PO7,int A,int B,int C,int D,int F)
if (PO7 => 100 || PO7 <= 91)
cout << "Nota Final: A" <<A<<endl;
else return B;
while(PO7 < 100 || PO7 >= 91);
if(PO7 < 90 || PO7 >= 81)
cout << "Nota Final: B" <<B<< endl;
else return C;
while(PO7 < 90 || PO7 >= 81);
{
if(PO7 < 80 || PO7 >= 71)
cout << "Nota Final: C" <<C<<endl;
else return D;
}
while(PO7 < 80 || PO7 >= 71);
{
if(PO7 < 70 || PO7 >= 61)
cout << "Nota Final: D" << D<< endl;
else return F;
}
while(PO7 < 70 || PO7 >= 61);
{
if(PO7 < 60 || PO7 >= 0)
cout << "Nota Final: F" << endl;
}
while(PO7 < 60 || PO7 >= 0);
cout<<"Muchas gracias y felices Vacaciones"<<endl;
return 0;
}
Valora esta pregunta
0