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

please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................

2011


Where define directive used?

1087


What is memcpy() function?

1113


List the difference between a 'copy constructor' and a 'assignment operator' in C?

1087


What is the purpose of ftell?

1074


Why do we use stdio h and conio h?

1081


p*=(++q)++*--p when p=q=1 while(q<=6)

1756


Can a function argument have default value?

1143


What are two dimensional arrays alternatively called as?

1175


What are different types of pointers?

1065


What is a c token and types of c tokens?

1057


Do pointers store the address of value or the actual value of a variable?

1077


What is a program flowchart?

1190


how do you execute a c program in unix.

1111


What is the ANSI C Standard?

1268