Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(void)
- {
- char name[20+1];
- int note[4];
- double schnitt;
- printf("Bitte Name eingeben:\n");
- scanf("%s", name); fflush(stdin);
- int i;
- for(i=0;i<3;i++)
- {
- printf("Bitte Note eingeben:\n");
- scanf("%d", note[i]); fflush(stdin);
- }
- schnitt=0.0;
- system("pause");
- for(i=0; i<3;i++)
- {
- schnitt = schnitt + (double)note[i];
- }
- system("pause");
- schnitt = schnitt / 4.0;
- printf("%s hat einen Schnitt von %lf\n",name, schnitt);
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement