Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* by kyl3 xd */
- using namespace std;
- #include <stdio.h>
- #include <windows.h>
- int main(int args, char *argss[])
- {
- float gnote=0;
- for(int i = 1; i <= 5; i++)
- {
- float pNote;
- printf("Digite a %da nota: \n", i);
- scanf("%f", &pNote);
- if(pNote < 5.0 || pNote > 10.0)
- {
- i--;
- continue;
- }
- printf("Nota dada: %f\n\n", pNote);
- (i == 5||i == 1) ? i : gnote += pNote;
- }
- printf("Nota final: %f", gnote);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement