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

//Ha Ha I'm the creator of shortest code
//for prime numbers
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();
printf("\t\t\tPRIME NUMBERS 1-20\n");
printf("\n\t2");
for(i=3;i<=20;i++)
for(j=2;j<i,i%j!=0;j++)
if(i-1==j)
printf("\n\t%d",i);
getch();
}

Is This Answer Correct ?    6 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question

2017


What is the difference between declaring a variable by constant keyword and #define ing that variable?

3282


What is the general form of #line preprocessor?

944


Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.

1045


which is an algorithm for sorting in a growing Lexicographic order

1742


What is the significance of scope resolution operator?

1341


What are the types of data structures in c?

1077


c language interview questions & answer

1894


What is use of bit field?

1231


What is a memory leak? How to avoid it?

1253


What does 4d mean in c?

1445


What is use of null pointer in c?

954


hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm

1964


How to get string length of given string in c?

1005


What type of function is main ()?

993