Minggu, 01 Juli 2012

Contoh Fungsi Non Void (MODULAR)


cooding:

#include <iostream.h>
#include <conio.h>
int luas(int p, int l)
{return (p*l); }
main(){
   int pj,lb;
   cout<<"Panjang = ";cin>>pj;
   cout<<"Lebar   = ";cin>>lb;
   cout<<"\nLuasnya = "<<luas(pj,lb);
   getch();
}

0 komentar:

Posting Komentar