#include "stdio.h" #include "conio.h" #define TABLE_UP_TO_20 20 void table_of_a_number(int number); int main() { int i = 0x00; printf("Enter a positive number in decimal whose table has to be generated"); scanf("%d",&i); table_of_a_number(i); return 0; } void table_of_a_number(int number) { int count = 0x00; for(count = 0x01;count <=TABLE_UP_TO_20 ;count++) { /* THis will print the table*/ printf(" %d * %d = %d\n", number,count, (number*count)); }
Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.
Write a program to convert a 2-digit BCD number into hexadecimal
Class&genus
The simplest way is to add a loop around the ask-for-the-number, show-the-table routine. In pseudocode:while (1) { ask-for-the-number; show-the-table; }
sum=0 i=1 echo "Enter any number " read num while [ $i -le 10 ] do sum=`expr $num \* $i` i=`expr $i + 1` echo "Table of a number is " $sum done
WRITE A PROGRAM TO CONVERT A 2-DIGIT bcd NUMBER INTO HEXADECIMAL
See the related links section for a link to a JAR file containing this program.
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
Yes, I can.
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