top of page




CHALLENGE 5
Conditional Statements
HOW ?
STEP 1: Complete the problem statement
STEP 2: Attempt the Quiz
You need to score more than 80 % to clear the Challenge
STEP 3: Upload your Quiz certificate, program code and your head shot(optional)
Not yet registered?
step 1: Code It!
Click Here
step 2: Quiz It!
Click Here
PROBLEM STATEMENT
Write a program that inputs a number and checks whether it is positive or negative. If it is positive display its square otherwise its cube .
Example:
Sample input & output:
Enter number: 2
The number is positive and its square is :4
Enter number: -4
The number is negative and its cube is : -64
2 raised to power 4 is : 16
TRY AND CHECK
Code It
step 3: Upload!

bottom of page