Tutorial C++ (Belajar Pemograman C++)

Blog Tentang Pembahasan Tutorial - tutorial Bahasa Pemograman C++

Saturday, January 26, 2019

Program Pengecekan Ganjil Genap dan Positif Negatif dengan C++

Program Pengecekan Bilangan Ganjil / Genap dan Bernilai Positif / Negatif


Sorce Code :


Test run :




Full SouceCode :
#include "iostream"
using namespace std;
int main() {int bilangan;cout << "Program Pengecekan Bilangan Ganjil/Genap dan Bernilai Positif/Negatif\n\n";cout << "Masukan Bilangan yang Akan di Cek = ";cin >> bilangan;
if (bilangan % 2 == 0) { cout << bilangan << " Adalah Angka Genap\n\n";}else{ cout << bilangan << " Adalah Angka Ganjil\n\n";}
if (bilangan == 0) { cout << bilangan << " Bernilai Netral\n\n";}else if(bilangan > 0){ cout << bilangan << " Bernilai Positif\n\n";}else cout << bilangan << " Bernilai Negatif\n\n";}

system("pause");
}

Posted by wellykrisnabayu at 3:44 AM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

btc

Earn free bitcoin

About Me

My photo
wellykrisnabayu
View my complete profile

Still New Collage Student

My photo
wellykrisnabayu
View my complete profile

Blog Archive

  • ▼  2019 (4)
    • ►  October (1)
    • ▼  January (3)
      • Program Pengecekan Ganjil Genap dan Positif Negati...
      • Program Menghitung Luas dan Keliling SegiTiga deng...
      • PERCABANGAN "IF ELSE" C++
  • ►  2016 (5)
    • ►  October (5)
Picture Window theme. Powered by Blogger.