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 ?    321 Yes 87 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 ?    167 Yes 55 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 22 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 ?    43 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 / 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 6 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 / 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

main() { char a[4]="HELL"; printf("%s",a); }

3 Answers   Wipro,


abcdedcba abc cba ab ba a a

2 Answers  


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

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


Implement a t9 mobile dictionary. (Give code with explanation )

1 Answers   Amazon, Yahoo, Peak6,


how to test pierrot divisor

0 Answers  






Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like.

21 Answers   Google, Goldman Sachs, eBay, ABC, Microsoft, HUP, TATA,


how to return a multiple value from a function?

5 Answers   Wipro,


Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange

0 Answers  


#include <stdio.h> main() { char * str = "hello"; char * ptr = str; char least = 127; while (*ptr++) least = (*ptr<least ) ?*ptr :least; printf("%d",least); }

1 Answers  


Code for 1>"ascii to string" 2>"string to ascii"

1 Answers   Aricent, Global Logic,


Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.

2 Answers   Wipro,


How can you relate the function with the structure? Explain with an appropriate example.

0 Answers  






Categories