Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float media(float p1, float p2, float p3)
- { float m;
- return m=((p1+p2+p3)/3);
- }
- float principal(float m)
- {
- if(m>=7&&m<=10)
- {return printf("aprovado");}
- else{
- if(5<=m<7)
- {return printf("recuperacao");}
- else{
- if(m<5)
- {return printf("reprovado");}
- else{return 0;}
- }
- }
- }
- int main()
- {
- float p1;
- float p2;
- float p3;
- float m;
- printf("Digite a p1 do aluno:\n");
- scanf("%f",&p1);
- printf("Digite a p2 do aluno:\n");
- scanf("%f",&p2);
- printf("Digite a p3 do aluno:\n");
- scanf("%f",&p3);
- printf("A situacao do aluno e':");
- return principal(m);
- }
Add Comment
Please, Sign In to add comment