#include<iostream.h>
#include<conio.h>
void gaya(double m, double a); //prototype function
void main() //main function
{
double m,a;
cout<<"Massa : "; cin>>m;
cout<<"percepatan : "; cin>>a;
cout<<"F : ";
gaya(m,a); //parameter aktual
getch();
}
void gaya(double m, double a) //function definition
{
double hasil;
hasil=m*a;
cout<<hasil;
}
Tidak ada komentar:
Posting Komentar