write a Program to dispaly upto 100 prime numbers(without
using Arrays,Pointer)
Answer Posted / sathya
#include<iostream.h>
void main()
{
int n,a;
cout<<"enter the limit";
cin>>n;
for(i=1;i<=n;i++}
{
if(i=1)
{
cout<<"1 is neither a prime nor a composite no";
}
else if(i%1==0|i%i==0)
{
cout<<i<<"is a prime number";
}
}
}
| Is This Answer Correct ? | 63 Yes | 165 No |
Post New Answer View All Answers
How can I call fortran?
How to draw the flowchart for structure programs?
How can you determine the maximum value that a numeric variable can hold?
Is c is a middle level language?
What are the ways to a null pointer can use in c programming language?
What are pointers? What are stacks and queues?
What are c header files?
What are types of preprocessor in c?
What are the types of assignment statements?
Give me the code of in-order recursive and non-recursive.
What's the total generic pointer type?
What are register variables in c?
What is the difference between test design and test case design?
Not all reserved words are written in lowercase. TRUE or FALSE?
In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping