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 dispaly upto 100 prime numbers(without
using Arrays,Pointer)

Answer Posted / jigar

#include<stdio.h>
#include<conio.h>
void main()
{
int a,n,f;
clrscr();
for(n=1;n<=100;n++)
{
f=0;

for(a=2;a<n;a++)
{
if(n%a==0)
{
f=1;
break;
}
}
if(f==0)
printf("%d",n);
}
getch();
}
// JIGAR SHOBHANA (ANIDA VACHHARA-GONDAL)

Is This Answer Correct ?    4 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell us two differences between new () and malloc ()?

1272


I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.

2306


What are pointers?

1156


What are the rules for identifiers in c?

1117


When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd

1125


Is exit(status) truly equivalent to returning the same status from main?

1115


Explain how can I convert a string to a number?

1145


What happens if you free a pointer twice?

1134


What is #define size in c?

1263


Is stack a keyword in c?

1145


What is difference between Structure and Unions?

1301


Explain what are compound statements?

1100


What is the general form of a C program?

1068


What is selection sort in c?

1168


Why we use conio h in c?

1297