Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 566 Bytes

File metadata and controls

20 lines (15 loc) · 566 Bytes

Question no:1

Write a program to take two numbers as input and print their difference if the first number is greater than the second number otherwise print their sum.

INPUT:

  • First line will contain the first number (N1)
  • Second line will contain the second number (N2).

OUTPUT:

Output a single line containing the difference of 2 numbers (N1−N2) if the first number is greater than the second number otherwise output their sum (N1+N2).

Constraints

  • −1000≤N1≤1000
  • −1000≤N2≤1000

Sample Input:

  • 82
  • 28

Sample Output:

  • 54