Skip to content
Snippets Groups Projects
Commit fa0347f7 authored by Mikołaj Suszek's avatar Mikołaj Suszek
Browse files

Upload New File

parent 035f127d
No related merge requests found
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main() {
int n;
float sum;
float avg;
int tab[10]={0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
for (int i=0; i<10; i++){
printf("\n Podaj %i lczbe \n", i+1);
scanf("%i", &n);
tab[i]=n;
sum += n;
}
avg=(sum)/10 ;
printf("Srednia arytmetyczna to: \n %f \n", avg);
return 0;
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment