Computer Science, asked by 8hsyedaraisa, 2 months ago

write a program to accept a number and check whether it is divisible by 10 or not. use if else and write two outputs.​

Answers

Answered by deveshkumar9563
0

Answer:

It is one of the powerful conditional statement. If statement is responsible for modifying the flow of execution of a program. If statement is always used with a condition. The condition is evaluated first before executing any statement inside the body of If.

In the above program, we have initialized two variables with num1, num2 with value as 1, 2 respectively.

Then, we have used if with a test-expression to check which number is the smallest and which number is the largest. We have used a relational expression in if construct. Since the value of num1 is smaller than num2, the condition will evaluate to true.

Similar questions