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

hi send me sample aptitude papers of cts?

0 Answers  


How old is c programming language?

0 Answers  


what is the function of pragma directive in c?

0 Answers  


write an algorithm and a program to count the number of elements in a circularly singly linked list

1 Answers   Ignou,


Write a C program to fill a rectangle using window scrolling

1 Answers  






Define function pointers?

1 Answers  


What's the difference between constant char *p and char * constant p?

0 Answers   Celstream,


How to implement a packet in C

0 Answers   Aricent,


What is your stream meaning?

0 Answers  


The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference

0 Answers  


what is unsigened char and what is the difference from char

2 Answers  


The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.

0 Answers  


Categories