Jawaban:
Input alas segitiga: 5
Input tinggi segitiga: 7
Luas segitiga = 17.5
Penjelasan:
include <iostream>
using namespace std;
int main()
{
cout << "## Program C++ Menghitung Luas Segitiga ##" << endl;
cout << "============================================" << endl;
cout << endl;
float a, t, luas;
cout << "Input alas segitiga: ";
cin >> a;
cout << "Input tinggi segitiga: ";
cin >> t;
luas = 0.5 * a * t;
cout << "Luas segitiga = "<< luas << endl;
return 0;
" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
Jawaban:
Input alas segitiga: 5
Input tinggi segitiga: 7
Luas segitiga = 17.5
Penjelasan:
include <iostream>
using namespace std;
int main()
{
cout << "## Program C++ Menghitung Luas Segitiga ##" << endl;
cout << "============================================" << endl;
cout << endl;
float a, t, luas;
cout << "Input alas segitiga: ";
cin >> a;
cout << "Input tinggi segitiga: ";
cin >> t;
cout << endl;
luas = 0.5 * a * t;
cout << "Luas segitiga = "<< luas << endl;
return 0;