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 |
typedef struct error{int warning, error, exception;}error; main() { error g1; g1.error =1; printf("%d",g1.error); }
Write a complete program that consists of a function that can receive two numbers from a user (M and N) as a parameter. Then print all the numbers between the two numbers including the number itself. If the value of M is smaller than N, print the numbers in ascending flow. If the value of M is bigger than N, print the numbers in descending flow. may i know how the coding look like?
main(){ char a[100]; a[0]='a';a[1]]='b';a[2]='c';a[4]='d'; abc(a); } abc(char a[]){ a++; printf("%c",*a); a++; printf("%c",*a); }
There are 21 people in a room. They have to form groups of 3 people each. How many combinations are possible? Write a C program to print the same.
main() { int i = 0xff ; printf("\n%d", i<<2); } a. 4 b. 512 c. 1020 d. 1024
what will be the position of the file marker? a: fseek(ptr,0,SEEK_SET); b: fseek(ptr,0,SEEK_CUR);
main() { signed int bit=512, i=5; for(;i;i--) { printf("%d\n", bit >> (i - (i -1))); } } a. 512, 256, 0, 0, 0 b. 256, 256, 0, 0, 0 c. 512, 512, 512, 512, 512 d. 256, 256, 256, 256, 256
What is data _null_? ,Explain with code when u need to use it in data step programming ?
#include<stdio.h> main() { const int i=4; float j; j = ++i; printf("%d %f", i,++j); }
How can you relate the function with the structure? Explain with an appropriate example.
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.
Write a program that find and print how many odd numbers in a binary tree