How we print the table of 2 using for loop in c
programing?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
PROG. TO PRODUCE 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1
plz send me all data structure related programs
why java is platform independent?
which function is used to clear the buffer stream on gcc? for example: I wrote following code on gcc #include<stdio.h> int main(void) { char ch; int a,b; printf("\nenter two numbers:\t"); scanf("%d%d",&a,&b); printf("enter number is %d and %d",a,b); printf("\nentercharacter:\t"); scanf("%c",&ch); printf("enter character is %c",ch); return 0; } in above progarm ch could not be scan. why?plz tell me solution.
How can u say that a given point is in a triangle? 1. with the co-ordinates of the 3 vertices specified. 2. with only the co-ordinates of the top vertex given.
I need your help, i need a Turbo C code for this problem.. hope u'll help me guys.? Your program will have a 3x3 array. The user will input the sum of each row and each column. Then the user will input 3 values and store them anywhere, or any location or index, temporarily in the array. Your program will supply the remaining six (6) values and determine the exact location of each value in the array. Example: Input: Sum of row 1: 6 Sum of row 2: 15 Sum of row 3: 24 Sum of column 1: 12 Sum of column 2: 15 Sum of column 3: 18 Value 1: 3 Value 2: 5 Value 3: 6 Output: Sum of Row 1 2 3 6 4 5 6 15 7 8 9 24 Sum of Column 12 15 18 Note: Your program will not necessary sort the walues in the array Thanks..
Write a function to find the depth of a binary tree.
13 Answers Adobe, Amazon, EFI, Imagination Technologies,
main() { extern i; printf("%d\n",i); { int i=20; printf("%d\n",i); } }
How do you write a program which produces its own source code as its output?
could you please send the program code for multiplying sparse matrix in c????
{ int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }
main( ) { void *vp; char ch = ‘g’, *cp = “goofy”; int j = 20; vp = &ch; printf(“%c”, *(char *)vp); vp = &j; printf(“%d”,*(int *)vp); vp = cp; printf(“%s”,(char *)vp + 3); }