Source Code



Program Bilangan Rata - Rata

  • Sulaeman Susanto
  • Jul 25' 13
  • C++
  • 47
  • 254
  • Indonesia

Program Menghitung Bilangan rata - rata

langsung cek aja ya kodingnya gan.

 

#include "stdio.h"
#include "conio.h"
void main()
{ clrscr();
  float r,i,x,t=0;
  int y,batas;
  printf("masukan jumlah bilangan= "); scanf("%i",&batas);
  for (y=1;y<=batas; y++)
     for (i=0; i<=batas-1; i++)
     { printf("entry bilangan %i:",y); scanf("%f",&x);
       t=t+x;
       y=y+1;
     }
  printf("
 Total : %.2f",t);
  r=t/i;
  printf("
 Rata-Rata Adalah : %.2f",r);
  getch();
}

  • Tags :
comments powered by Disqus

Related Code

Program menghitung bilangan urut

Membuat program Tahun Kabisat

Tips and Trick using jQuery

Send Email from PHP

Marquee in Delphi

Internet Connection Check

TCP Connection

Message in DLL File

Get Computer Name



Category