Table of Contents
In this tutorial, we will discuss the While loop in C programming language
In the C Programming Language, the while is used to evaluates test condition and executes the statement(s) until the Boolean condition becomes true. When the condition becomes false, control exit the loop and goes to the next statement after the while.
}
Initially, the while loop evaluates the test expression inside the parenthesis
if the test expression is true, codes inside the body of while loop are executed and the test expression is evaluated again until the test expression becomes false
when the test expression becomes false the loop control exits from the loop and loop terminated
This program displays positive numbers of 1 to 10
The above code is executed, it produces the following result
1
2
3
4
5
6
7
8
9
10
Program 2
while loop using logical or operator
Multiply two numbers in Java using scanner| 5 different ways In this article, we will…
5 Different ways to Divide two numbers in Java using scanner In this article, we…
Learn 8 Ways to Subtract Two Numbers Using Methods in Java In this article, we…
10 ways to subtract two numbers in Java In this article, we will discuss the…
Java Code Examples – Multiply Two Numbers in 5 Easy Ways In this article, we…
How to Divide two numbers in Java| 5 different ways In this article, we will…
This website uses cookies.