Making a easy C++ Odd or Even Checker.
For extra Supply Codes go to right here.
Create the essential c++ program format utilizing header file iostream and namespace std.
#embody <iostream>
utilizing namespace std;
int major()
{
return 0;
}
After this create a integer variable n, and output a message and let the consumer enter a quantity.
int n;
cout<<"Enter quantity: ";
cin>>n;
Now utilizing if and else we are going to see whether or not the entered quantity is divisible by two, whether it is then its a even quantity in any other case an odd quantity.
if(npercent2==0)
cout<<n<<" It's an Even Quantity";
else
cout<<n<<" It's an Odd Quantity";
Now you can full this system and run it in any compiler to verify its working.
#embody <iostream>
utilizing namespace std;
int major()
{
int n;
cout<<"Enter quantity: ";
cin>>n;
if(npercent2==0)
cout<<n<<" It's an Even Quantity";
else
cout<<n<<" It's an Odd Quantity";
return 0;
}