Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #define n 100
- int main(void)
- {
- int v[100],*p,i;
- float med=0.;
- p=v;
- for (i=0;i<n;i++)
- {
- *(p+i)=i+1; // TENDEU?
- printf("%p \t %d \n",&v[i],v[i]);
- med+=v[i];
- }
- printf("Média: %.1f \n",med/(i+1));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement