Tugas4.2

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> using namespace std; int main() { int Alas, Tinggi; float Luas; puts ("----------------------------------------------"); cout <<"Program Menghitung Luas Segitiga"<<endl; puts ("----------------------------------------------"); cout <<"Masukan Nilai Alas Segitiga \t:"<<endl; cin>>Alas; cout <<"Masukan Nilai Tinggi Segitiga \t:"<<endl; scanf("%d", &Tinggi); puts ("----------------------------------------------"); puts("Luas Segitiga = (alas \t* tinggi)\t*0.5"); printf("Luas Segitiga = ("), printf("%d", Alas), printf(" \t* %d )\t\t*0.5 \n", Tinggi); Luas = (Alas * Tinggi) / 2; printf ("luas segitiga = %.2f \n", Luas); puts ("----------------------------------------------"); cout <<"Nama = Muhammad Chairul Ramadhani"<<endl; cout <<"NIM = 1620230015"<<endl; puts ("----------------------------------------------"); return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines