Write a program in Java showing the table of number entered
Write a program in Java showing the table of number entered by the user.
Solution
#include \"conio.h\"
#include \"stdio.h\"
void main()
{
int num,result,i=1;
printf(\"\ Enter a number to generate the table : \");
scanf(\"%d\",&num);
printf(\"\ The table of %d is given below\",num);
while(i<=10)
{
result=num*i;
printf(\"\ \\t %d * %d = %d\",num,i,result);
i++;
}
getch();
}

