Program Cek positif atau negatif

 Program :

#include <iostream>

using namespace std;


int main() {

    int x;

    cout << "Program Menentukan Bilangan Positif dan Negatif\n";

    cout << "Masukkan bilangan bulat: ";

    cin >> x;


    if (x > 0)

        cout << "Positif";

    else if (x < 0)

        cout << "Negatif";

    else

        cout << "Nol";


    return 0;

}


Hasil Run :





Comments

Popular posts from this blog

Program Menghitung Volume Balok

Program Memperkenalkan keluarga

Program Keliling Persegi Panjang