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
What is variable in c example?
What are the keywords in c?
On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area
List some of the static data structures in C?
Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.
What is an lvalue?
How do you search data in a data file using random access method?
What is your stream meaning?
Explain what standard functions are available to manipulate strings?
Write a program to print fibonacci series using recursion?
What is an array in c?
What are the back slash character constants or escape sequence charactersavailable in c?
Explain how can a program be made to print the line number where an error occurs?
How can I pad a string to a known length?
difference between Low, Middle, High Level languages in c ?