0% found this document useful (0 votes)
5 views1 page

Table Program Using While Loop

This C program prompts the user to enter a number and then uses a while loop to print the multiplication table for that number from 0 to 10. The variable 'i' is initialized but not set to 0, which may cause the loop to not execute as intended. The program calculates and displays the product of the input number and the loop index 'i' in each iteration.

Uploaded by

harshyudi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

Table Program Using While Loop

This C program prompts the user to enter a number and then uses a while loop to print the multiplication table for that number from 0 to 10. The variable 'i' is initialized but not set to 0, which may cause the loop to not execute as intended. The program calculates and displays the product of the input number and the loop index 'i' in each iteration.

Uploaded by

harshyudi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Table Program using while loop

#include <stdio.h>
#include <math.h>
double a,b,c;
int i;
int main()
{
printf("Enter:");
scanf(" %lf",&a);
while(i < 11)
{
c = a*i;
printf(" \n%lf X %d = %lf",a,i,c);
i++;
}
return (0);
}

https://www.programiz.com/online-compiler/4rlPYzb7r4AhJ

You might also like