Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler

1130


write a c program to print the next of a particular no without using the arithmetic operator or looping statements?

4054


why do some people write if(0 == x) instead of if(x == 0)?

1134


How can I dynamically allocate arrays?

1171


What are the modifiers available in c programming language?

1281


Are the expressions * ptr ++ and ++ * ptr same?

1210


What is the role of && operator in a program code?

1134


Can variables be declared anywhere in c?

1151


Explain how do you generate random numbers in c?

1136


For what purpose null pointer used?

1118


Write the test cases for checking a variable having value in range -10.0 to +10.0?

2372


What is c definition?

1342


How do you use a pointer to a function?

1151


How is pointer initialized in c?

1094


How can you find the day of the week given the date?

1241