Table of Contents
In the C programming language, one forloop inside another forloop is known as nested forloop.
Syntex of nested for loop
for (initialization; boolean_expresion; increment or dicrement){
// statement(s) inside the body
for (initialization; boolean_expresion; increment or dicrement){
// statement(s) inside the body
} // End of inner for loop
} // End of outer for loop
Here we can see, a for loop is inside the body another for loop
Program 1
The program dispalys square number pattern.
When you execute the above code, it produces the following result
12345678910
12345678910
12345678910
12345678910
12345678910
12345678910
12345678910
12345678910
12345678910
12345678910
Program 2
The program prints the multiplication tables
When you execute the above code, it produces the following result
Program 3
The program prints the multiplication tables
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.