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 |
An application package has been provided to you without any documents for the following application. The application needs to be tested. How will you proceed?
Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?
How can you be sure that a program follows the ANSI C standard?
Hi, main() { } Is a user defined function or Built in Functionn
A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile
Why does not use getgh(); and <conio.h> in c language.
How to throw some light on the b tree?
what is difference between procedural language and functional language ?
main() { int a=0; if(a=0) printf("Ramco Systems\n"); printf("India\n"); } output?
How can I ensure that integer arithmetic doesnt overflow?
wat is the output int main() { char s1[]="Hello"; char s2[]="Hello"; if(s1==s2) printf("Same"); else printf("Diff"); }
Explain how can I convert a number to a string?