write the program for prime numbers?
Answer Posted / santhoshi
main()
{
for(int i=1;i<100;i++)
{
count=0;
for(j=1;j<=100;j++)
{
if(i%j==0)
{
count++;
}
}
if(count==2)
{
printf(i);
}
}
getch();
}
| Is This Answer Correct ? | 12 Yes | 12 No |
Post New Answer View All Answers
What are the differences between Structures and Arrays?
Can static variables be declared in a header file?
What happens if a header file is included twice?
What is merge sort in c?
a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above
write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.
4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.
Explain how can I read and write comma-delimited text?
Describe the order of precedence with regards to operators in C.
How many data structures are there in c?
Describe wild pointers in c?
What does stand for?
Is null always defined as 0(zero)?
What are the types of c language?
Explain how can you tell whether two strings are the same?