Write a program to print the prime numbers from 1 to 100?
Answer Posted / deva
int main()
{
int i,j,count=0;
for(i=2;i<100;i++)
{
for( j=2;j<i;j++)
{
if(i%j==0)
count++;
}
if (count==0)
printf("%d\t",i);
count=0;
}
}
Is This Answer Correct ? | 22 Yes | 37 No |
Post New Answer View All Answers
What happens if you free a pointer twice?
What is a stream water?
What is a global variable in c?
Do array subscripts always start with zero?
write a programming in c to find the sum of all elements in an array through function.
How many types of operator or there in c?
What are the types of variables in c?
Explain how can I convert a string to a number?
What type of function is main ()?
What does %d do?
What is dynamic memory allocation?
Can the curly brackets { } be used to enclose a single line of code?
Compare array data type to pointer data type
Why c is procedure oriented?
c language interview questions & answer