Contoh penggunaan IF_ELSE

#include<iostream>
using namespace std;
main(){
int age, height;

cout<<"Input age"; cin >> age;
cout<<"input height"; cin >> height; if(height == age) { cout << "Your height is equal to your age!"; } else if(height < age) { cout << "Your height is less than your age!"; } else if(height > age) { cout << "Your height is greater than your age!";
return 0; }
}

Output :

Share this

Related Posts

Previous
Next Post »

:)
:(
hihi
:-)
:D
=D
:-d
;(
;-(
@-)
:P
:o
:>)
(o)
:p
:-?
(p)
:-s
(m)
8-)
:-t
:-b
b-(
:-#
=p~
$-)
(y)
(f)
x-)
(k)
(h)
cheer