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 are the different types of errors?
What does *p++ do?
why we wont use '&' sing in aceesing the string using scanf
what is the different bitween abap and abap-hr?
What are the scope of static variables?
What is meant by high-order and low-order bytes?
How main function is called in c?
Are enumerations really portable?
please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code
Why can’t constant values be used to define an array’s initial size?
What is main () in c?
Linked list is a Linear or non linear explain if linear how it working as a non linear data structures
stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.
What is a far pointer in c?
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.