Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(){
- int n,s,c;
- float m;
- do{
- printf("Digite um valor: ");
- scanf("%d", &n);
- s= s+n;
- c++;
- }while(n>0);
- m=s/c;
- printf("A media dos valores digitados foi: %d", m);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement