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

#include<iostream.h>
#include<conio.h>


int main ()
{
for (int i=2; i<100; i++)
for (int j=2; j<i; j++)
{
if (i % j == 0)
break;
else if (i == j+1)
cout << i << "\t";

}
getch();
}

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different types of linkage exist in c?

1073


Do you know what are the properties of union in c?

1131


Explain b+ tree?

1122


An application package has been provided to you without any documents for the following application. The application needs to be tested. How will you proceed?

1288


Define C in your own Language.

1131


Explain what are multidimensional arrays?

1121


Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.

1169


How can I find out how much free space is available on disk?

1103


What is the difference between int main and void main?

1093


What is the hardest programming language?

1211


Differentiate between null and void pointers.

1226


what is bit rate & baud rate? plz give wave forms

2027


What does %c mean in c?

1137


What are the different types of control structures?

1082


in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none

1153