Wiki User
∙ 12y ago/*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();
}
Wiki User
∙ 13y agoWiki 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));
}
Write a program using recursion which should take two values and display 1st value raised to the power of second value.
this is to write or create
write a c++ program to convert binary number to decimal number by using while statement
write a program that reads a phrase and prints the number of lowercase latters in it using a function for counting? in C program
import java.math.BigInteger; public class Factorial { public static void main(String[] args) { BigInteger n = BigInteger.ONE; for (int i=1; i<=20; i++) { n = n.multiply(BigInteger.valueOf(i)); System.out.println(i + "! = " + n); }
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.
this is to write or create
Write a program to convert a 2-digit BCD number into hexadecimal
recu
#include<iostream.h>
WRITE A PROGRAM TO CONVERT A 2-DIGIT bcd NUMBER INTO HEXADECIMAL
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 c++ program to convert binary number to decimal number by using while statement
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 c++program by using if statement to read a number and check whether it is positive or negative