Skip to content

Instantly share code, notes, and snippets.

@andrinur13
Created January 31, 2019 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrinur13/0b5a4a550dd8409d01c2a000425aff4c to your computer and use it in GitHub Desktop.
Save andrinur13/0b5a4a550dd8409d01c2a000425aff4c to your computer and use it in GitHub Desktop.
soal uas no 1
#include <iostream>
using namespace std;
int ls(int x, int y) {
int hasil;
return hasil = x * y;
}
int kel(int P, int L) {
return 2*(P+L);
}
main() {
int Pj, Lb;
cout << " Masukkan Panjang : ";
cin >> Pj;
cout << endl;
cout << " Masukkan Lebar : ";
cin >> Lb;
cout << "Luas adalah : " << ls(Pj, Lb) << endl;
cout << "Keliling adalah : " << kel(Pj, Lb) << endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment