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 |
void pascal f(int i,int j,int k) { printf(ā%d %d %dā,i, j, k); } void cdecl f(int i,int j,int k) { printf(ā%d %d %dā,i, j, k); } main() { int i=10; f(i++,i++,i++); printf(" %d\n",i); i=10; f(i++,i++,i++); printf(" %d",i); }
main() { int i=-1; -i; printf("i = %d, -i = %d \n",i,-i); }
main() { show(); } void show() { printf("I'm the greatest"); }
how can u draw a rectangle in C
53 Answers Accenture, CO, Codeblocks, Cognizant, HCL, Oracle, Punjab National Bank, SAP Labs, TCS, University, Wipro,
struct point { int x; int y; }; struct point origin,*pp; main() { pp=&origin; printf("origin is(%d%d)\n",(*pp).x,(*pp).y); printf("origin is (%d%d)\n",pp->x,pp->y); }
C statement to copy a string without using loop and library function..
Finding a number multiplication of 8 with out using arithmetic operator
Write a program that find and print how many odd numbers in a binary tree
void main() { int c; c=printf("Hello world"); printf("\n%d",c); }
main() { if ((1||0) && (0||1)) { printf("OK I am done."); } else { printf("OK I am gone."); } } a. OK I am done b. OK I am gone c. compile error d. none of the above
What is the hidden bug with the following statement? assert(val++ != 0);
String copy logic in one line.