write a programme that inputs a number by user and gives
its multiplication table.

Answers were Sorted based on User's Feedback



write a programme that inputs a number by user and gives its multiplication table...

Answer / vignesh1988i

#include<stdio.h>
#include<conio.h>
void main()
{
int n,m;
printf("enter the table number you want :");
scanf("%d",&n);
printf("enter the steps upto which you want :");
scanf("%d",&m);
for(int i=1;i<=m;i++)
{
printf("%d * %d =%d",i,n,i*n);
}
getch();
}

Is This Answer Correct ?    3 Yes 2 No

write a programme that inputs a number by user and gives its multiplication table...

Answer / venkatesh sabinkar

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,i,c;
printf("enter the number:");
scanf("%d",&a);
printf("enter upto how many steps upto you want :");
scanf("%d",&b);
c=b;
for(i=1;i<=b;i++)
{
printf("%d * %d =%d",i,a,c=c+a);
}
getch();
}
getch();

Is This Answer Correct ?    2 Yes 3 No

Post New Answer

More C Interview Questions

What does s c mean in text?

0 Answers  


1. Write a C program to count the number of occurrence of a specific word in the given strings. (for e.g. Find how many times the word “live” comes in the sentence “Dream as if you’ll live forever, live as if you’ll die today ”)

12 Answers   Eskom, TCS,


a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list

0 Answers  


Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10

1 Answers   CMS,


Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.

0 Answers  






difference between my-strcpy and strcpy ?

3 Answers   Geometric Software, IIM, Infosys,


What is the use of ?: Operator?

0 Answers  


Is there anything like an ifdef for typedefs?

0 Answers  


Difference between Class and Struct.

13 Answers   Ericsson, Motorola, Wipro,


1.What is a Data Structure? Explain its need? 2.What is a Directed Graph? Write an algorithm to find whether a Directed Graph is connected or not? 3.Explain the process of converting a Tree to a Binary Tree.

4 Answers   Ignou, TCS,


Write a Program to accept different goods with the number, price and date of purchase and display them

0 Answers   HDFC,


Suggesting that there can be 62 seconds in a minute?

0 Answers  


Categories