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
What are the different types of linkage exist in c?
Do you know what are the properties of union in c?
Explain b+ tree?
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?
Define C in your own Language.
Explain what are multidimensional arrays?
Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.
How can I find out how much free space is available on disk?
What is the difference between int main and void main?
What is the hardest programming language?
Differentiate between null and void pointers.
what is bit rate & baud rate? plz give wave forms
What does %c mean in c?
What are the different types of control structures?
in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none