write a c program that prints all multiples of 3between 1
and 50.

Answers were Sorted based on User's Feedback



write a c program that prints all multiples of 3between 1 and 50...

Answer / yamuna

/*A.Yamuna III BSc CS L.R.G. COLLEGE,TIRUPUR*/
#include<stdio.h>
#include<conio.h>
void main()
{
int a;
printf("The multiples of 3 between 1 and 50 are :");
for(a=1;a<=50;a++)
{
if(a%3==0)
{
printf("\n%d",a);
}
}
getch();
}

Is This Answer Correct ?    47 Yes 6 No

write a c program that prints all multiples of 3between 1 and 50...

Answer / dj

#include<stdio.h>
#include<conio.h>
Void main()
{
int i;
for(i=1;i<=50;i++)
{
if(i%3==0)
{
printf("%d",i);
}
}
grtch();
}

Is This Answer Correct ?    24 Yes 13 No

write a c program that prints all multiples of 3between 1 and 50...

Answer / narsi

#include<stdio.h>
#include<conio.h>
void main()
{
int n1,n2;
n1=1;
n2=50;
while(n1<=n2)
{
if(n1%3==0)
printf("%d ",n1);
n1=n1+1;
}
}

Is This Answer Correct ?    12 Yes 4 No

write a c program that prints all multiples of 3between 1 and 50...

Answer / pruthiewraj swain

#include<stdio.h>
#include <conio.h>
voidmain()
{
int a ;
printf("enter the multiples of 3");
while (a=100)
{
if (a%3==0|| a%4==0)
}
printf("
%d",a);
}}
getch();
}

Is This Answer Correct ?    0 Yes 0 No

write a c program that prints all multiples of 3between 1 and 50...

Answer / hemanth

#include<stdio.h>
#include<conio.h>
void main()
{
int n1,n2;
n1=1;
n2=50;
while(n1<=n2)
{
if(n1%3==0)
printf("%d ",n1);
n1=n1+1;
}
}

Is This Answer Correct ?    5 Yes 6 No

Post New Answer

More C Interview Questions

What is identifier in c?

0 Answers  


4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.

0 Answers   TCS,


to get a line of text and count the number of vowels in it

3 Answers   Satyam,


what is the use of macro program

1 Answers   TCS,


who did come first hen or agg

15 Answers   Infosys,






7. Identify the correct argument for the function call fflush() in ANSI C: A)stdout B)stdin C)stderr D)All the above

10 Answers   Accenture,


hat is a pointer?

4 Answers   Assurgent,


What is sizeof in c?

0 Answers  


print ur name 20,000 times without using inbuilt library functions like printf,scanf,gets,puts,getchar or putchar

4 Answers   IBM,


what is the difference between malloc() and calloc() function?

1 Answers  


code for replace tabs with equivalent number of blanks

0 Answers   Bosch,


12. Look at the Code: main() { int a[]={1,2,3},i; for(i=0;i<3;i++) { printf("%d",*a); a++; } } Which Statement is/are True w.r.t the above code? I.Executes Successfully & Prints the contents of the array II.Gives the Error:Lvalue Required III.The address of the array should not be changed IV.None of the Above. A)Only I B)Only II C)II & III D)IV

4 Answers   Accenture,


Categories