0
I need to know if the person is approved or failed. For the concept D and frequency greater than 75 is appearing approved but was to be disapproved.
#include <stdio.h>
#include <conio.h>
#include <string.h>
#include <stdlib.h>
using namespace std;
int main()
{
float frequencia;
char nome[180],conceito[180];
printf("Digite seu nome: ");
scanf("%s",&nome);
printf ("\n Digite seu conceito final com letra MAIUSCULA:");
scanf ("%s",&conceito);
printf ("\n Digite o valor da sua frequencia:");
scanf ("%f",&frequencia);
printf ("\n Nome do aluno:%s",nome);
printf ("\n O valor da sua frequencia e %f",frequencia);
if(conceito=="C" || frequencia>=75){
printf ("\n Voce esta aprovado");
}
else
printf ("\n Voce esta reprovado");
getch ();
return 1 ;
if(conceito=="B" || frequencia>=75){
printf ("\n Voce esta aprovado");
}
else
printf ("\n Voce esta reprovado");
getch ();
return 1 ;
if(conceito=="A" || frequencia>=75){
printf ("\n Voce esta aprovado");
}
else
printf ("\n Voce esta reprovado");
getch ();
return 1 ;
if(conceito=="D" && frequencia >=75){
printf ("\n Voce esta reprovado");
}
else
printf("\n Voce esta reprovado");
getch ();
}
Next error is occurring with me, I asked for help from some friends they tried to change, but it was the same as yours and when I gave D and >=75 my skirt wrong, but in your show A >=75 Failed, that with A,B and C being that it was to appear approved. (More specifically the only mistake of mine you fixed but gave error in others)
– Dead
The checking of strings was being incorrect, already corrected
– Lucas Duete