You are here:   HomeC Programming (Pratical)Write a Program for Number is Armstrong Number
by Dinesh Thakur Category: C Programming (Pratical)

This is C Program to Print a Table with While Loop. In this program the User asks to print a table with the use of while loop. While loop checks the condition at least once and after that it goes on. Three variables are declared to containing the value in it for condition falling. User asks to enter the value. Then using of while condition. While (a<=10) then c=b*a. and so on increment operator a++ and printing the result on the screen.

Problem Statement:
This is program where user print a table with the use of while condition.

  1. Declaring variable.
  2. Using While condition.
  3. Display result on the screen.

Here is source code of the C program where user print a table with the use of while condition. The C program is successfully compiled. The program output is also shown below.

#include<stdio.h>

void main()
{
     int a=1,b,c;
     clrscr();
     printf("Enter Any Value : ");
     scanf("%d",&b);
     printf("Table of %d is : ",b); 
     while(a<=10)
          {
                c=b*a;
                printf(" %d ",c);  
                a++;
          }
               getch();

Table with While Loop



Search Content







Advance Courses



Basic Courses



Advertise with Us