How we print the table of 2 using for loop in c
programing?
Answers were Sorted based on User's Feedback
Answer / muavia
#include<stdio.h>
#include<conio.h>
void main(void)
{
printf("Which table you want: ");
int t;
scanf("%d",&t);
for (int i=1;i<11;i++)
printf("\n%d * %d = %d",t,i,t*i);
getch();
}
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / amit kumar singh
#include<stdio.h>
#include<conio.h>
void main()
int i;
printf("the table of two no");
for(i=1;i<=10;i++)
{
printf("
%d",r*2);
getch();
}
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / chandan partap singh
#include<stdio.h>
#include<conio.h>
void main()
{
int i,c;
clrscr();
printf("Table of 2
");
for(i=1;i<=10;i++)
{
printf("2*%d=%d
",i,2*i);
}
getch();
}
Is This Answer Correct ? | 2 Yes | 2 No |
Answer / sandeep tayal
If you are looking for printing a table using c in unix
environment where c is actually used you can find the
following link helpful.
http://myblogs.netne.net/program-to-print-table-of-2-in-c-using-vi/
Is This Answer Correct ? | 8 Yes | 9 No |
#include<conio.h> main() { int x,y=2,z,a; if(x=y%2) z=2; a=2; printf("%d %d ",z,x); }
#include<stdio.h> main() { const int i=4; float j; j = ++i; printf("%d %f", i,++j); }
How we print the table of 3 using for loop in c programing?
int a=1; printf("%d %d %d",a++,a++,a); need o/p in 'c' and what explanation too
pls anyone can help me to write a code to print the values in words for any value.Example:1034 to print as "one thousand and thirty four only"
Write a program to implement the motion of a bouncing ball using a downward gravitational force and a ground-plane friction force. Initially the ball is to be projected in to space with a given velocity vector
main() { char c; int i = 456; clrscr(); c = i; printf("%d", c); } a. 456 b. -456 c. random number d. none of the above
main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
{ int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }
main() { int i; clrscr(); printf("%d", &i)+1; scanf("%d", i)-1; } a. Runtime error. b. Runtime error. Access violation. c. Compile error. Illegal syntax d. None of the above
main() { int i = 0xff ; printf("\n%d", i<<2); } a. 4 b. 512 c. 1020 d. 1024
create a C-code that will display the total fare of a passenger of a taxi if the driver press enter,the timer will stop. Every 10 counts is 2 pesos. Initial value is 25.00