Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(){
  5. int n,s,c;
  6. float m;
  7.  
  8. do{
  9. printf("Digite um valor: ");
  10. scanf("%d", &n);
  11. s= s+n;
  12. c++;
  13. }while(n>0);
  14. m=s/c;
  15. printf("A media dos valores digitados foi: %d", m);
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement