answersLogoWhite

0

i'll take a stab at it, though i'm a java person..

#include<stdio.h>

main() {

for (int i = 1; i<9;){ printf(i); i*=-1; if(i<0) i-=2;

else

i+=2;

}

}

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

BeauBeau
You're doing better than you think!
Chat with Beau
SteveSteve
Knowledge is a journey, you know? We'll get there.
Chat with Steve
RafaRafa
There's no fun in playing it safe. Why not try something a little unhinged?
Chat with Rafa

Add your answer:

Earn +20 pts
Q: How can you print 1 -3 5 -7 9 in c code?
Write your answer...
Submit
Still have questions?
magnify glass
imp