Nested while Loops in C Programming Language

C Programming Language / Loop control in C Language

1842

Program:

#include<stdio.h>
void main()
{
int i = 1;
int j = 1;

while(i<=3){
  while(j<=3){
    printf("Welcome ");
    j++;
   }
    printf("\n");
    j = 1;
i++; 
}
  
}

Output:

Welcome Welcome Welcome
Welcome Welcome Welcome
Welcome Welcome Welcome
Press any key to continue . . .

Explanation:

None

This Particular section is dedicated to Programs only. If you want learn more about C Programming Language. Then you can visit below links to get more depth on this subject.