PROGRAM UNTUK MENYELEKSI SUATU BILANGAN dalam bentuk C++

//PROGRAM UNTUK MENYELEKSI SUATU BILANGAN

#include <iostream.h>

#include <conio.h>

 

void main()

{

int i, nilai;

 

cout <<” menghitung nilai “<<endl;

i = 0;

while (i < 3)

{

cout<<“masukkan nilai: “;

cin>>nilai;

 

if (nilai > 66)

cout<<“nilainya tinggi”<<endl;

else if (nilai > 31)

cout<<“nilainya sedang”<<endl;

else if (nilai < 30)

cout<<“nilainya rendah”<<endl;

 

i++;

}

 

getch();

}

RUN :

Advertisements
Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s