for (int i = 0; i < 3; i++)
for (int j = 0; j < 3; j++)
if (j = i) table [j] = 1;
else table [j] = 0;
amras123
0
Newbie Poster
Recommended Answers
Jump to PostCompiler says no. Single "=" is assignment, which doesn't return a boolean.
No output in any case, since you're only assigning to memory, not writing to the screen.
Fun puzzle in C, though. Should create an array like so:0 0 0 1 1 …
All 3 Replies
jon.kiparsky
326
Posting Virtuoso
apines
116
Practically a Master Poster
Featured Poster
Dhruv Gairola
-3
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.