Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdio.h"
- void main()
- {
- int n,i,p=0;
- float x,max1=0;
- printf("Numarul de elevi este:");scanf("%d",&n);
- for(i=1;i<=n;i++){
- do{
- printf("\nNota elevului %d este:",i);scanf("%f",&x);
- if(max1<x)
- max1=x;
- if(max1==x)
- p++;
- }while((x<=1)&&(x>=10));
- }
- printf("\nCea mai mare nota este %.2f si a fost obtinuta de %d ori.",max1,p);
- }
Advertisement
Add Comment
Please, Sign In to add comment