Write a program to input a number and test whether the number is positive negetive or zero using for loop
Answers
Answered by
1
Look, For loop is used when you know how many times the program should iterate.
For the above program, If else If or Switch are better suited. There are just 3 conditions and no iteration is possible in first glance.
Let me know if you need the code in If Else If or Switch.
For the above program, If else If or Switch are better suited. There are just 3 conditions and no iteration is possible in first glance.
Let me know if you need the code in If Else If or Switch.
Similar questions