How we print the table of 3 using for loop in c
programing?

Answers were Sorted based on User's Feedback



How we print the table of 3 using for loop in c programing?..

Answer / chitra

int i,no;
for(i=1;i<=10;i++)
{
no=i*3;
printf("%d",no);
}

Is This Answer Correct ?    22 Yes 5 No

How we print the table of 3 using for loop in c programing?..

Answer / teja

for(i=1;i<=10&&printf("3*%d=%d",i,3*i);i++);

Is This Answer Correct ?    11 Yes 1 No

How we print the table of 3 using for loop in c programing?..

Answer / tevendra singh pardhi

#include<stdio.h>
main()
{
int i,ans;
for(i=1;i<=10;i++)
{
ans=3*i;
printf("%d",&ans) ;
}
return 0;
}

Is This Answer Correct ?    5 Yes 0 No

How we print the table of 3 using for loop in c programing?..

Answer / sanjay kr marandi

#include<stdio.h>
main()
{
int n,i,t=1;

printf("/nEnter a table:");
scanf("%d",&n);
for(i=1;i<=10;i++)
{
t=n*i;
printf("%dX%d=%d\n",n,i,t);
}

Is This Answer Correct ?    1 Yes 0 No

How we print the table of 3 using for loop in c programing?..

Answer / k.anuroop

#include<stdio.h>
main()
{
int a,i;
i=0;
for(i=0;i<21;i++)
{
a=3*i;
printf("\n3*%d=%d",i,a);
}
}

Is This Answer Correct ?    1 Yes 0 No

How we print the table of 3 using for loop in c programing?..

Answer / salu

\\its work for any table u want :)\\

#include<stdio.h>
#include<conio.h>

int main ()
{


int i=0;
int j=0;
int k=1;
int no=0;
printf("ENTER table no :");
scanf("%d",&i);
printf("ENTER lenght:");
scanf("%d",&j);

for (k=1;k<=j;k++)
{no=k*i;

printf("%d*%d=%d\n",i,j,no);
}
getch();
}

Is This Answer Correct ?    2 Yes 1 No

How we print the table of 3 using for loop in c programing?..

Answer / chitra

int i;
for(i=1;i<=10;i++)
{
i=i*3;
printf("%d",i);
}

Is This Answer Correct ?    11 Yes 20 No

Post New Answer

More C Code Interview Questions

main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); } a. 2 b. 100 c. 4 d. none of the above

5 Answers   HCL,


find A^B using Recursive function

2 Answers  


void main() { void *v; int integer=2; int *i=&integer; v=i; printf("%d",(int*)*v); }

1 Answers   Honeywell,


Set up procedure for generating a wire frame display of a polyhedron with the hidden edges of the object drawn with dashed lines

0 Answers   IBM,


main() { int a[10]; printf("%d",*a+1-*a+3); }

1 Answers  






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); }

1 Answers  


int i=10; main() { extern int i; { int i=20; { const volatile unsigned i=30; printf("%d",i); } printf("%d",i); } printf("%d",i); }

1 Answers  


How we will connect multiple client ? (without using fork,thread)

3 Answers   TelDNA,


Is this code legal? int *ptr; ptr = (int *) 0x400;

1 Answers  


program to find magic aquare using array

4 Answers   HCL,


void main() { int const * p=5; printf("%d",++(*p)); }

3 Answers   Infosys, Made Easy, State Bank Of India SBI,


main() { while (strcmp(“some”,”some\0”)) printf(“Strings are not equal\n”); }

1 Answers  


Categories