Given 2 integer input check whether the 2 input are "Equal" or "Not Equal" and print the corresponding message.Input Format:Accept two integers as inputOutput Format:Print the output as "Equal" or "Not Equal"Constraints:1 <= INPUT <= 10^15
Question
Given 2 integer input check whether the 2 input are "Equal" or "Not Equal" and print the corresponding message.Input Format:Accept two integers as inputOutput Format:Print the output as "Equal" or "Not Equal"Constraints:1 <= INPUT <= 10^15
Solution
To solve this problem, follow these steps:
- Accept two integers as input.
- Compare the two integers to check if they are equal.
- If the integers are equal, print "Equal".
- If the integers are not equal, print "Not Equal".
Here is the code in Python:
# Accept two integers as input
num1 = int(input("Enter the first integer: "))
num2 = int(input("Enter the second integer: "))
# Compare the two integers
if num1 == num2:
print("Equal")
else:
print("Not Equal")
Make sure to handle any exceptions that may occur, such as if the user enters non-integer values.
Similar Questions
Given an integer input , whether the given input is "Positive" or "Negative" or "Zero" and print the corresponding messageInput Format:Enter an integer as a input Output Format: Print the output as "Negative" or "Positive" or "Zero"Constraints:1 <= INPUT <= 10^15Sample Input 1:-98Sample Output 1:NEGATIVESample Input 2:0Sample Output 2:ZERO
Given 2 numbers, find the minimum of these 2 numbersInput Format:Accept two integer values as inputs.Output Format:Print the output as "Minimum of INPUT1 and INPUT2 is ____".Constraints:-10^15 <= INPUT <= 10^15Sample Input 1:10 20Sample Output 1:Minimum of 10 and 20 is 10Sample Input 2:10 200Sample Output 2:Minimum of 10 and 200 is 10
Multiply the given two numbers without using * operator.Input Format:Accept two integers as input.Output Format:Print the output as product of input1 and input2Constraints:1 <= INPUT <= 10^15Sample Input :10 2Sample Output :20
Problem Statement:Given 2 numbers, print the first number as a 5-digit number and print the second number in the next line with 5 width spaceExplanation: If numbers are 25 and 98,print the first number as 00025 and second number as 3 space and 98( 98).Input Format:Accept the two integer as a inputOutput Format:5 digit number format followed by number with 5 width space in new line.Constraints:10^-15 <= num1,num2 <= 10^15Sample Input 1:34 7896Sample Output 1:000347896Sample Input 2:-125 -36Sample Output 2:-0125-36
Given a positive integer denoting , do the following:If , print the lowercase English word corresponding to the number (e.g., one for , two for , etc.).If , print Greater than 9.Input FormatThe first line contains a single integer, .ConstraintsOutput FormatIf , then print the lowercase English word corresponding to the number (e.g., one for , two for , etc.); otherwise, print Greater than 9 instead.Sample Input
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.