Saturday 12 October 2013
TUTORIAL C++ PROGRAM MENGHITUNG IP DENGAN IF DAN ELSE
# include<iostream>
using namespace std;
int main ()
{ int nilai,a,b,c,d,e ;
cout << " masukan nilai yang akan diuji ="; cin>> nilai ;
cout << " ip anda adalah =" ;
if ( nilai >= 81) { cout<< " a" ; }
else
if ( nilai >= 71) { cout<< " b" ; }
else
if ( nilai >= 61) { cout<< " c" ; }
else
if ( nilai >= 51) { cout<< " d" ; }
else
if ( nilai >= 41) { cout<< " e" ; }
}
SMOGA BERMANFAAT.
Labels:
C++,
ILMU,
TEKNIK INFORMATIKA,
TUTORIAL
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment