Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Check if a number is positive, negative, or zero

Easy

Problem Statement

Check if a number is positive, negative, or zero

Sample Input

-5

Sample Output

-5 is a negative number

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
fun main() { val number = -5 // Add your code here to check the type of number }
Log in or sign up to run or submit your code.Log inSign up
Input
-5
Expected Output
-5 is a negative number