Find whether given Number is Odd or Even
Write a C++ Program to Find whether given Number is Odd or Even. Here’s simple Program to Find whether given Number is Odd or Even in C++ Programming Language.
For example if user enters an odd number like 5 then the output will be Odd number and if user enters even number like 8 then output will be Even number.
Here is source code of the C++ Program to Find whether given Number is Odd or Even. The C++ program is successfully compiled and run(on Codeblocks) on a Windows system. The program output is also shown in below.
SOURCE CODE : :
/* C++ Program to Find whether given Number is Odd or Even */ #include<iostream> using namespace std; int main() { int a; cout<<"Enter any positive number :: "; cin>>a; if(a%2==0) { cout<<"\nThe Entered Number [ "<<a<<" ] is EVEN Number.\n"; } else { cout<<"\nThe Entered Number [ "<<a<<" ] is ODD Number.\n"; } return 0; }
Output : :
/* C++ Program to Find whether given Number is Odd or Even */ Enter any positive number :: 1327 The Entered Number [ 1327 ] is ODD Number. Process returned 0
Above is the source code for C++ Program to Find whether given Number is Odd or Even which is successfully compiled and run on Windows System.The Output of the program is shown above .
If you found any error or any queries related to the above program or any questions or reviews , you wanna to ask from us ,you may Contact Us through our contact Page or you can also comment below in the comment section.We will try our best to reach up to you in short interval.
Thanks for reading the post….
thanku for this informations🥰
1- Write a program that design a program which shows at the top Transport Route decision chart through nested if-else statement that takes integer distance in kilometers from residence to university and checks the condition in the following format: · If distance is less than and equals to 1km than print “Come university by foot” · If distance is above 1 km but below and equals to 3km than print “Come University by public transport” · If distance is above 3km less than 5 km than print “Come university by university point” · else change the university. · Also, apply condition that indicates negative value of… Read more »