Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

nested loop in c

#include<stdio.h>
void main(){
    int N,i,j;
    printf("enter 'N':
");
    scanf("%d",&N);
    printf("
");
    for(i=1;i<=N;i++){
        for(j=1;j<=i;j++){
            printf("*   ");
        }
        printf("
");
    }
    printf("
");
}
 
PREVIOUS NEXT
Tagged: #nested #loop
ADD COMMENT
Topic
Name
6+8 =