Sum OR Difference
All submissions for this problem are available.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 \leq N1 \leq 1000$ - $-1000 \leq N2 \leq 1000$ ###Sample Input: 82 28 ###Sample Output: 54
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.5, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, rust, SCALA, swift, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, kotlin, PERL6, TEXT, SCM chicken, CLOJ, COB, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.