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
Explain what are multibyte characters?
In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none
What is type qualifiers?
What is Dynamic memory allocation in C? Name the dynamic allocation functions.
When should a far pointer be used?
How can I dynamically allocate arrays?
What are unions in c?
What is substring in c?
Can you apply link and association interchangeably?
Which built-in library function can be used to match a patter from the string?
Write a program to swap two numbers without using third variable?
why use "return" statement a) on executing the return statement it immediately transfers the control back to the calling program b) it returns the value present in the parentheses return, to the calling program c) a & b d) none of the above
How can you be sure that a program follows the ANSI C standard?
Can 'this' pointer by used in the constructor?
Write a program to print ASCII code for a given digit.