Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
- int main(int argc, char *argv[])
- {
- int a[10],i,sum,r;
- sum=0;
- float mor;
- mor=0;
- srand ( time(0) );
- for (i=1;i<=10;i++)
- {
- r = rand() % 100;
- a[i]=r;
- printf("%d\n",a[i]);
- sum=sum+a[i];
- }
- printf("to athroisma einai %d\n",sum);
- mor=sum/10,000;
- printf("o mesos oros einai %f\n",mor);
- system("PAUSE");
- return 0;
- }
Add Comment
Please, Sign In to add comment