< Prev
Next >


If-else Statement





In the if-else statement of C++ language, the condition in the parenthesis of if is evaluated for a boolean value - true or false.






if else example


 /* C++ if else example */

#include<iostream>

using namespace std;
int main()
{
if(10<50)
	cout<<"10 is less than 50";
else
	cout<<"10 is greater than 50";

return 0;
}


Output -

10 is less than 50


Please share this article -

Facebook Google Pinterest Reddit Tumblr Twitter




< Prev
Next >
< If Statement
Else-If Statement>

Please Subscribe

Please subscribe to our social media channels for daily updates.


Decodejava Facebook Page  DecodeJava Twitter Page Decodejava Google+ Page

Notifications



COMING SOON
-
PYTHON