Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int N,Max=0,Min=0,nbrMin=1,nbrMax=1;
- printf("Entrez une note entre (0 et 20) :\n ");
- scanf("%d",&N);
- Min=N;
- do{
- printf("donner une note (-1 pour finir);");
- scanf("%d",&N);
- if(N==-1) break;;
- if(N>Max) Max=N;
- else if(N==Max) nbrMax++;
- if(N<Min) Min=N;
- else if(N==Min) nbrMin++;
- }while(N>=0 && N<=20);
- printf("la NOTE Maximale est %d attribues %d fois\n",Max,nbrMax);
- printf("la NOTE Minimal est %d attribues %d fois\n",Min,nbrMin);
- printf("\n\n");
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment