S
sameer
1-develop a flowchart and then write a c program to display all prime
number less than the number entered by the user.
number less than the number entered by the user.
homework alert!sameer said:1-develop a flowchart and then write a c program to display all prime
number less than the number entered by the user.
sameer said:1-develop a flowchart and then write a c program to display all prime
number less than the number entered by the user.
sameer said:1-develop a flowchart and then write a c program to display all prime
number less than the number entered by the user.
Eric said:Flowcharts are difficult in monospaced text, so I'll leave
that part to you. Here's the program, though, with error- and
sanity-checking omitted for brevity:
#include <stdio.h>
int main(void) {
unsigned int limit;
unsigned int value;
printf ("Number, please? ");
fflush (0);
Eric Sosman wrote:
Can you tell me why you're using 0 instead of stdout?
$ man fflush
When calling fflush, if stream is a null pointer, all files open
for writing only and all files open for update whose last operation
was a write are flushed.
Eric Sosman said:"What he said." And my purpose was obfuscatory deviltry,
with a sneaking hope that it might survive all the way into
the O.P.'s homework submission, where it would likely elicit
santosh's question from the O.P.'s instructor and cause him
a well-deserved dose of embarrassment ...
1-develop a flowchart and then write a c program to display all prime
number less than the number entered by the user.
rahul said:Try Sieve of Eratosthenes.
http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes
<weird>
You are using this as a homework forum and everyone is responding.
</weird>
1-develop a flowchart and then write a c program to display all prime
number less than the number entered by the user.
1-develop a flowchart and then write a c program to display allprime
number less than the number entered by the user.
int _(int n, int m, int d, int t=0)
Ben said:This is not C (though that may be deliberate given the context).
jacob said:Of course is not C, but lcc-win supports that!
CBFalconer said:That sounds like a bug. How do you get lcc-win to report the error?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.