Meseriasul

identat

Dec 7th, 2014
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1. #include "stdio.h"
  2. void main()
  3. {
  4.     int n,i,p=0;
  5.     float x,max1=0;
  6.  
  7.     printf("Numarul de elevi este:");scanf("%d",&n);
  8.     for(i=1;i<=n;i++){
  9.         do{
  10.             printf("\nNota elevului %d este:",i);scanf("%f",&x);
  11.         if(max1<x)
  12.             max1=x;
  13.         if(max1==x)
  14.             p++;
  15.         }while((x<=1)&&(x>=10));
  16.     }
  17.     printf("\nCea mai mare nota este %.2f si a fost obtinuta de %d ori.",max1,p);
  18. }
Advertisement
Add Comment
Please, Sign In to add comment