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

Answers were Sorted based on User's Feedback



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

Answer / anil kumar nahak

#include<stdio.h>
#include<conio.h>
void main()
{
int num=2,r;
clrscr();
printf("\n The Table Of Number Two \n");
for(r=1;r<=10;r++)
{
printf("\n %d * %d = %d",num,r,num*r);
}
getch();
}

Is This Answer Correct ?    333 Yes 93 No

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

Answer / shruthi

int i,result;

for(i=1;i<=10;i++)
{
result=i*2;
printf("%d\n",result);
}

Is This Answer Correct ?    174 Yes 58 No

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

Answer / hemendra singh gurjar

#include<stdio.h>
#include<conio.h>
void main()
{
int r;
clrscr();
printf("\n The Table Of Number Two \n");
for(r=1;r<=10;r++)
{
printf("\n%d",r*2);
}
getch();
}

Is This Answer Correct ?    79 Yes 23 No

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

Answer / jitender singh

#include<stdio.h>
#include<conio.h>
Void main()
{
Int r;
Clrscr();
Printf("\n The table of Number Two \n");
for(r=1;r<=10;r++)
{
printf("\n%d",r*2);
}
getch();
}

Is This Answer Correct ?    44 Yes 20 No

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

Answer / vaibhav

int i,result;

for(i=1;i<=10;i++)
{
result=i*2;
printf("%d\n",result);
}

Is This Answer Correct ?    36 Yes 26 No

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

Answer / mohib ullah orakzai

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a=2,b;
for(int c=1;c<=10;c++)
{
b=a*c;
cout<<a<<"*"<<c<<"="<<b<<endl;
}
getch();
}

Is This Answer Correct ?    24 Yes 15 No

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

Answer / laxmi kanth

#include<stdio.h>
main()
{
int a,n;
printf("/nenter the table:\n");
scanf("%d",&a);
for(n=1;n<=10;n++)
printf("\nthe table is:\n%d*%d=%d,a,n,a*n);
}

Is This Answer Correct ?    18 Yes 13 No

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

Answer / naresh

#include<stdio.h>
int main(void)
{
int a=2,c;
for(c=1;c<=10;c++)
{
printf("%4d",a*c);
}
return 0;
}

Is This Answer Correct ?    12 Yes 7 No

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

Answer / dipankar kumar

Yes

Is This Answer Correct ?    20 Yes 18 No

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

Answer / aik expert

<?php
for ($a=0; $a<=10; $a++)
{
$b=$a*3;
echo "3*$a=$b<br>";

}
?>

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Code Interview Questions

Write a C program to add two numbers before the main function is called.

11 Answers   Infotech, TC,


int swap(int *a,int *b) { *a=*a+*b;*b=*a-*b;*a=*a-*b; } main() { int x=10,y=20; swap(&x,&y); printf("x= %d y = %d\n",x,y); }

1 Answers  


given integer number,write a program that displays the number as follows: First line :all digits second line : all except the first digit . . . . Last line : the last digit

8 Answers  


how to concatenate the two strings

1 Answers  


Give a oneline C expression to test whether a number is a power of 2?

25 Answers   EA Electronic Arts, Google, Motorola,






main() { static int var = 5; printf("%d ",var--); if(var) main(); }

1 Answers  


hello sir,is there any function in C that can calculate number of digits in an int type variable,suppose:int a=123; 3 digits in a.what ll b answer?

6 Answers  


main() { int i=_l_abc(10); printf("%d\n",--i); } int _l_abc(int i) { return(i++); }

2 Answers  


create a login program that ask username and password. if you input username or password 3 times wrong, the program will terminate else the program will prompt a message "congratulations"

2 Answers  


main() { int i=300; char *ptr = &i; *++ptr=2; printf("%d",i); }

4 Answers   CSC,


what is oop?

3 Answers  


typedef struct error{int warning, error, exception;}error; main() { error g1; g1.error =1; printf("%d",g1.error); }

1 Answers  


Categories