Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
644 B
0
Indexable
Never
#include <iostream>
using namespace std;

int main() {
    int a, b, c;

    cout << "Masukkan panjang sisi a: ";
    cin >> a;
    cout << "Masukkan panjang sisi b: ";
    cin >> b;
    cout << "Masukkan panjang sisi c: ";
    cin >> c;

    if (a + b > c && a + c > b && b + c > a) {
        if (a == b && b == c) {
            cout << "Segitiga Sama Sisi" << endl;
        } else if (a == b || a == c || b == c) {
            cout << "Segitiga Sama Kaki" << endl;
        } else {
            cout << "Segitiga Sembarang" << endl;
        }
    } else {
        cout << "Bukan Segitiga" << endl;
    }

    return 0;
Leave a Comment