answersLogoWhite

0


Best Answer

/*mycfiles.wordpress.com

Program to prepare Table of any no. using while loop*/

#include

#include

void main()

{

int n,t,count=1;

clrscr();

printf("Enter any number\n\n");

scanf("%d",&n);

while(count<=10)

{

t=n*count;

printf("\n%d*%d=%d",n,count,t);

count++;

}

getch();

}

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

#include<stdio.h>

#include<conio.h>

int table(int n,int i);

void main()

{

int n,i,r;

clrscr();

printf("Enter the no.\n");

scanf("%d",&n);

for(i=1;i<=10;i++)

{

r=table(n,i);

printf("%d*%d=%d\n",n,i,r);

}

getch();

}

int table(int n,int i)

{

if(i==1)

return(n);

else

return(n+table(n,i-1));

}

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program of using recursion to create a table of any number?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What type of science is recursion?

Recursion is a computer science. Typically computer programers write a specific program to test out a theory of recursion based on the known facts to try to define the variable.


Write a program using recursion which should take two values and display 1st value raised to the power of second value?

Write a program using recursion which should take two values and display 1st value raised to the power of second value.


Write a program to create a maze?

this is to write or create


Write a program to convert a 2 digit BCD number into hexadecimal number?

Write a program to convert a 2-digit BCD number into hexadecimal


How do you write print 1 to 100 using recursion only?

recu


Write a program in C to create a Circular Linked list?

#include&lt;iostream.h&gt;


2 Write a program to convert a 2-digit BCD number into hexadecimal?

WRITE A PROGRAM TO CONVERT A 2-DIGIT bcd NUMBER INTO HEXADECIMAL


How To write a java program to create three tier applications using servlets?

barsanabegam


Write a program which takes any number of days from the user the program should display the number of years number of months formed by these days as well as the remaining days?

Write a program which takes any number of days from the user. the program should display the number of years, number of months formed by these days as well as the remaining days.


How do you write a c program to convert binary to decimal by using while statement?

write a c++ program to convert binary number to decimal number by using while statement


Write a program that read phrase and print the number of lower-case letter in it using function of counting?

write a program that reads a phrase and prints the number of lowercase latters in it using a function for counting? in C program


Write a program By using if else statement to read a number and check whether it is positive or negative?

write a c++program by using if statement to read a number and check whether it is positive or negative