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

const int perplexed = 2; #define perplexed 3 main() { #ifdef perplexed #undef perplexed #define perplexed 4 #endif printf("%d",perplexed); } a. 0 b. 2 c. 4 d. none of the above

1 Answers   emc2, HCL,


#include<stdio.h> int main() { int a=3,post,pre; post= a++ * a++ * a++; a=3; pre= ++a * ++a * ++a; printf("post=%d pre=%d",post,pre); return 0; }

3 Answers  


#define int char main() { int i=65; printf("sizeof(i)=%d",sizeof(i)); }

1 Answers  


main() { 41printf("%p",main); }8

1 Answers  


main() { char str1[] = {‘s’,’o’,’m’,’e’}; char str2[] = {‘s’,’o’,’m’,’e’,’\0’}; while (strcmp(str1,str2)) printf(“Strings are not equal\n”); }

1 Answers  






How do I write a program to print proper subset of given string . Eg :input: abc output:{},{a},{b},{c},{a,b},{a,c},{b,c}, {a,b,c}.I desperately need this program please mail me to saravana6m@gmail.com

11 Answers   Deshaw, Infosys,


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

1 Answers  


How to swap two variables, without using third variable ?

104 Answers   AB, ADP, BirlaSoft, Cisco, Cygnet Infotech, HCL, Hewitt, Honeywell, HP, IBM, Infosys, Manhattan, Microsoft, Mobius, Percept, Satyam, SofTMware, TCS, Wipro, Yamaha,


find A^B using Recursive function

2 Answers  


What is wrong with the following code? int *foo() { int *s = malloc(sizeof(int)100); assert(s != NULL); return s; }

1 Answers  


#include<stdio.h> main() { register i=5; char j[]= "hello"; printf("%s %d",j,i); }

2 Answers  


int i,j; for(i=0;i<=10;i++) { j+=5; assert(i<5); }

3 Answers   Cisco, HCL,


Categories