Share your repls and programming experiences

← Back to all posts
Nota Aluno
Ewertom (0)

#include<iostream>
#include<stdlib.h>
using namespace std;

int main(){

int n1,n2,result;
string nf;
char ln;

inicio:
system("cls");

cout << "Digite a Primeira Nota :"; cin >> n1;
cout << "Digite a Segunda Nota :"; cin >> n2;
result=(n1+n2)/2;

cout << "Sua Media Foi:" << result << endl;
(result>=7) ? nf="Aprovado!\n" : nf="Reprovado!\n";
cout << "Situacao do Aluno " << nf;

cout << "Lancar Mais Notas [s/n]? ";
cin >> ln;

if (ln == 's' or ln == 'S'){
	goto inicio;
}

system("pause");
return 0;

}