Explore IDNLearn.com's extensive Q&A database and find the answers you're looking for. Ask your questions and get detailed, reliable answers from our community of knowledgeable experts.

Lab 5A Problem Input two DWORD values from the keyboard. Determine which number is larger or if they are even. Your program should look like the following: First number larger Enter a number 12 Enter a number 10 12 is the larger number Press any key to close this window... Second number larger Enter a number 10 Enter a number 12 12 is the larger number Press any key to close this window... Numbers Equal Enter a number 12 Enter a number 12 Numbers are equal Press any key to close this window...

Sagot :

Answer:

Explanation:

#include<iostream>

using namespace std;

int main()

{

int n1,n2;

cout<<"Enter a number:"<<endl; //Entering first number

cin>>n1;

cout<<"Enter a number:"<<endl; //Entering second number

cin>>n2;

if(n1%2==0 && n1%2==0) //Checking whether the two number are even or not

{

if(n1>n2)

{

cout<<n1<<" is the larger number"<<endl;

}

else if(n1==n2)

{

cout<<"Numbers are equal"<<endl;

}

else

{

cout<<n2<<" is the larger number"<<endl;

}

}

else

{

cout<<"The number are not even"<<endl;

}

}

Your presence in our community is highly appreciated. Keep sharing your insights and solutions. Together, we can build a rich and valuable knowledge resource for everyone. Your questions are important to us at IDNLearn.com. Thanks for stopping by, and come back for more reliable solutions.