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 advantages of Macro over function?
Which is best linux os?
write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.
How to write a code for reverse of string without using string functions?
What is meant by errors and debugging?
What does typedef struct mean?
What tq means in chat?
What are header files and what are its uses in C programming?
What is the difference between NULL and NUL?
What is %g in c?
Is c programming hard?
Which is better oop or procedural?
What is a floating point in c?
Why doesnt the call scanf work?
What is c value paradox explain?