#include <stdio.h>
#include <conio.h>
int main(){
int a,c,g,i,z,rx,ry,;
int x[20]={2,7,20,9,0,30,125,200,210,45,798,90,137,25,27,90,8,9};
int y[15]={12,75,2,9,8,30,45,79,90,13,25,9};
for(a=0;a<=19;a++){
if(x[i]==0)continue; g=a-2;
z+=x[a];}
printf("jumlah nilai a; %d\n",z);
printf("jumlah x; %d\n",g);
rx = z/g;
printf("rata-rata x; %d",rx);
for(a=0;a<=12;a++){
if(y[i]==0)continue;
c += y[a];}
printf("\njumlah nilai y; %d\n",c);
printf("jumlah y; %d\n",a);
ry = c/a;
printf("rata-rata y; %d",ry);
getch();
return(0);
}
0 komentar:
Posting Komentar