write a c program that prints all multiples of 3between 1
and 50.
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
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 |
What is identifier in c?
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.
to get a line of text and count the number of vowels in it
what is the use of macro program
who did come first hen or agg
7. Identify the correct argument for the function call fflush() in ANSI C: A)stdout B)stdin C)stderr D)All the above
hat is a pointer?
What is sizeof in c?
print ur name 20,000 times without using inbuilt library functions like printf,scanf,gets,puts,getchar or putchar
what is the difference between malloc() and calloc() function?
code for replace tabs with equivalent number of blanks
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