Kamis, 03 Maret 2016

Program Perhitungan Luas Segitiga

#include <iostream>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */using namespace std;

int main(int argc, char** argv) {
    int t,l,Luas;
    t =0; l =0; Luas =0;
   
    cout<<"Menghitung Luas Segtiga"<<endl;
    cout<<"Masukkan Tinggi : "; cin>>t;
    cout<<"Masukkan Lebar  : "; cin>>l;
   
    if(t<10)
      {
      (Luas = (t*l)/2);
      cout<<"luas = "<<Luas;
      }
     
    return 0;
}
Share:

0 komentar:

Posting Komentar