Kamis

calculate the average value

The following example program to calculate the average value,, in the program I'm using Borland C + + Builder ..

#include <iostream.h>
#include <conio.h>
void main()
{
float a,b,c;
float hasil;
cout<<”calculate the average value”<<endl<<endl;
cout<<”Match Score I   : “;
cin>>a;
cout<<”Match Score II  : “;
cin>>b;
cout<<”Match Score III : “;
cin>>c;
hasil = (a+b+c) / 3;
cout<<”\nThe average value is : “<<hasil;
getch();
}

Tidak ada komentar:

Posting Komentar