Q1: Take Two Number From The User and Display The Greater Number
Q1: Take Two Number From The User and Display The Greater Number
Q1: Take two number from the user and display the greater number
#include<iostream>
int main()
int num1,num2;
cin>>num1;
cin>>num2;
if(num1>num2)
else
return 0;
RESULT:
Q2: Take a number from the user and tell it that multiple of two or not
#include<iostream>
int main()
int num;
cout<<"enter a number:";
cin>>num;
if(num%2==0)
else
return 0;
Result:
Q: 3 Input two number from the user tae the sum and display that sum is
greater then 100 or not
#include<iostream>
int main()
int num1,num2;
cin>>num1,
cin>>num2;
int sum=num1+num2;
if(sum>100)
else
return 0;
RESULT:
Q:4 Input two number from the user , multiply them and tell their
answer is even or odd
#include <iostream>
int main()
int num1,num2;
cin>>num1,
cin>>num2;
int ans=num1*num2;
if(ans%2==0)
else
return 0;
}
RESULT:
Q:5 Input a number from the user if number is odd make it even ………
your program display message that number is already even
#include <iostream>
int main()
int num;
cin>>num;
if(num%2==0)
else
int result=num+1;
cout<<"the result is"<<result<<"as you can see number has been made even";
return 0;
Result: