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

what is the syallabus of computer science students in group- 1?

2322


What is the use of header files?

1114


Explain how do I determine whether a character is numeric, alphabetic, and so on?

1137


What is atoi and atof in c?

1088


Why main is not a keyword in c?

1260


What is the difference between pure virtual function and virtual function?

1127


what type of questions arrive in interview over c programming?

2032


How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?

1035


How important is structure in life?

1090


the question is that what you have been doing all these periods (one year gap)

2090


Differentiate between declaring a variable and defining a variable?

1045


What is the use of printf() and scanf() functions?

1135


The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none

1246


What is s in c?

1055


Write a program to reverse a string.

1081