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 program to print prime nums from 1-20 using c
programing?

Answer Posted / r@m$

#include<stdio.h>
void main(){
int x;
for(x=2;x<=20;x++){
if(x<4)
printf("%d\t",x);
else
if(x%2!=0 && x%3!=0)
printf("%d\t",x);
}
}

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a file other than a .h file be included with #include?

1218


What is bss in c?

1158


ATM machine and railway reservation class/object diagram

5308


Explain the use of keyword 'register' with respect to variables.

1096


What does the format %10.2 mean when included in a printf statement?

1708


What is array in c with example?

1356


Difference between pass by reference and pass by value?

1208


which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above

1781


What is the scope of static variable in c?

1078


what is uses of .net

1785


A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?

2363


Write a function that will take in a phone number and output all possible alphabetical combinations

1099


Explain what is the benefit of using #define to declare a constant?

1273


write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?

2923


What is the best way of making my program efficient?

1082