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 / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how can I avoid the abort, retry, fail messages?

990


write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);

2295


Place the #include statement must be written in the program?

989


any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above

983


What is the purpose of clrscr () printf () and getch ()?

1023


What is atoi and atof in c?

1028


Why void main is used in c?

999


how to capitalise first letter of each word in a given string?

1871


What is the basic structure of c?

1010


What are the types of bitwise operator?

1048


What are static variables in c?

1028


What is NULL pointer?

1040


Can two or more operators such as and be combined in a single line of program code?

1310


Which is best book for data structures in c?

1039


How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?

16590