How we print the table of 3 using for loop in c
programing?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
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 |
Answer / chitra
int i;
for(i=1;i<=10;i++)
{
i=i*3;
printf("%d",i);
}
Is This Answer Correct ? | 11 Yes | 20 No |
main() { int i, n; char *x = “girl”; n = strlen(x); *x = x[n]; for(i=0; i<n; ++i) { printf(“%s\n”,x); x++; } }
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
#define DIM( array, type) sizeof(array)/sizeof(type) main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr, int)); }
code of a program in c language that ask a number and print its decremented and incremented number.. sample output: input number : 3 321123
#include<stdio.h> #include<conio.h> void main() { int a=(1,2,3,(1,2,3,4); switch(a) { printf("ans:"); case 1: printf("1");break; case 2: printf("2");break; case 3: printf("1");break; case 4: printf("4");break; printf("end"); } getch(); }
Is the following code legal? struct a { int x; struct a *b; }
Find your day from your DOB?
15 Answers Accenture, Microsoft,
What is your nationality?
main() { int i=10; i=!i>14; Printf ("i=%d",i); }
main() { if ((1||0) && (0||1)) { printf("OK I am done."); } else { printf("OK I am gone."); } } a. OK I am done b. OK I am gone c. compile error d. none of the above
pls anyone can help me to write a code to print the values in words for any value.Example:1034 to print as "one thousand and thirty four only"
what is the output of following program ? void main() { int i=5; printf("%d %d %d %d %d ",i++,i--,++i,--i,i); }