Advertisement
ThaisAlmeida

Lista funções questão 6

Jun 17th, 2014
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.27 KB | None | 0 0
  1. int media(int total)
  2. {
  3.     int valor, resultado, valoressoma;
  4.     total = 0;
  5.     valoressoma = 0;
  6.     resultado = 0;
  7.     do
  8.     {
  9.     printf("Digite um numero: ");
  10.     scanf("%d", &valor);
  11.     total++;
  12.     valoressoma = valoressoma + valor;
  13.     resultado = valoressoma/total;
  14.     } while(2==2);
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement