J
Joe Smith
It is nothing short of embarrassing to feel the need to ask for help on
this. I can't see how I would make the main control for this. What I want
is a for loop and a test condition. And while I know, from things I
pondered 2 decades ago, that a fella can write code without a goto, I'm
stuck.
/* sieve1.c */
#define whatever 20
#define N whatever
#include <stdio.h>
int main(void)
{
int i, A[N+1], m, sum;
/* initialize to 0 */
for (i = 0; i <= N; ++ i) A = 0;
/* output */
printf("Primes less than N are:\n");
for (i = 2; i <= N; ++ i)
{
if (A == 0)
printf("%d
this. I can't see how I would make the main control for this. What I want
is a for loop and a test condition. And while I know, from things I
pondered 2 decades ago, that a fella can write code without a goto, I'm
stuck.
/* sieve1.c */
#define whatever 20
#define N whatever
#include <stdio.h>
int main(void)
{
int i, A[N+1], m, sum;
/* initialize to 0 */
for (i = 0; i <= N; ++ i) A = 0;
/* output */
printf("Primes less than N are:\n");
for (i = 2; i <= N; ++ i)
{
if (A == 0)
printf("%d