This is default featured post 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured post 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured post 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured post 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured post 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

Tampilkan postingan dengan label program membuat jumlah dan rata2 menggunakan for. Tampilkan semua postingan
Tampilkan postingan dengan label program membuat jumlah dan rata2 menggunakan for. Tampilkan semua postingan

Senin, 05 Maret 2012

program membuat jumlah dan rata2 menggunakan for

#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);
 
 
}
  
   
   

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More