What will the following program print in nested for loop? - C Statement

C examples for Statement:for

Description

What will the following program print in nested for loop?

Demo Code

#include <stdio.h> 
int main(void) 
{ 
     int n, m; /*from  www  . j  a  v  a2 s  .c  om*/
 
     for (n = 5; n > 0; n--) { 
        for (m = 0; m <= n; m++) 
             printf("="); 
        printf("\n"); 
     } 
     n = 30; 

}

Result


Related Tutorials