Sunday, 6 March 2022

Practical No.6: Write a program to check whether a number is positive, negative or zero.

ACTIVITY 6

Practical No.6:
Write a program to check whether a number is positive, negative or zero






OR

By Sir Sajjad Akber Chandio



VIVA VOCE
ACTIVITY 6

Q.1: What is an integer?
Ans: A number which is a whole number and cannot contain decimal point is called an integer.

Q.2: What is a positive number?
Ans: A number which is greater than zero is called a positive number.

Q.3 What is a negative number?
Ans: A number which is less than zero is called a negative number.

Q.4 What is if condition?
Ans: An if condition is a selection control structure that compares two values and evaluates the answer as true or false.


No comments:

Post a Comment