โ Back to If Statements
Question 265
Same Sign Check
Same Sign Check
Read two nonzero integers withscanf. If they have the same sign (both positive or both negative), print exactly: Same sign Otherwise print exactly: Different sign No trailing newline. For input3 7the output isSame sign; for input-2 5the output isDifferent sign.
Expected Output:
Same sign
Topics:
If Statements
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (p, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.