Computer Science, asked by pariharanita567, 4 months ago

write one difference between conditional statement and looping statement​

Answers

Answered by piyush433062
19

Explanation:

A conditional Statement is a statement which is used in place of a if-else-if statement. If the condition is true, it will execute expression 1 else it will execute expression 2. A loop on the other hand will do the same instructions again and again until the condition is satisfied.

Answered by jenisha145
2

A conditional statement, commonly known as an IF, may or may not be executed. It only runs once if it does (depending on whether a condition is met).

A looping statement (typically a WHILE or FOR) is one that repeats itself while a condition is true.

Explanation:

  • The conditional statement asks the programmer to declare one or more conditions that the programme will evaluate or test, as well as a statement or statements that will be run if the condition is true, and optionally, other statements that will be executed if the condition is false.
  • A programme loop is a set of statements that repeat for a certain number of times or until certain criteria are met. The WHILE clause tells the loop to keep running as long as the WHILE expression evaluates to true.
Similar questions