Home C C++ Java Python Perl PHP SQL JavaScript Linux Online Test Forum

Home » C » Solved Programs » Print 1 to 100 in tabular format

C program to print 1 to 100 in tabular format

#include <stdio.h>

int main()
{
int columns, rows, number;
rows =1;

do{
    columns=0;
    do{
        printf("%d\t ", columns*10+rows);
        
    }while(columns++ <9);
    printf("\n");
    
}while(rows++ <10);

    return 0;
}

Printing counting from 1 to 100

C program to print 1 to 100 in tabular format