Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 2nd, 2012  |  syntax: C  |  size: 0.65 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include<conio.h>
  2. #include<stdio.h>
  3.  int main ()
  4.     {
  5.      char ch;
  6.      ch='\0';
  7.      while (ch!='q')
  8.      {
  9.     int vet[10], num, med,maior;
  10.     med=0;
  11.     maior=0;
  12.     num=0;    
  13.      for(num=1;num<=10;num++)
  14.        {
  15.           printf("digite o numero ");
  16.           scanf("%d",&vet[num]);
  17.           med=(vet[num]+med)/10;
  18.            if (vet[num]>=med)
  19.                {
  20.                for(maior=0;;maior++)
  21.                    {
  22.                    printf("o valor e %d ", maior);
  23.                    }
  24.                }  
  25.                }
  26.                ch= getch();
  27.                }
  28.                getch();
  29.                }