answersLogoWhite

0


Best Answer

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

11y ago
This answer is:
User Avatar

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
Related questions

Java code to print prime numbers from 1 to 10?

System.out.println("2, 3, 5, 7"); There are so few you dont need to calculate it


How do you print a series 1 plus 3 plus 5 plus 7 in basic?

EXAMPLE 1 PRINT 1+3+5+7 EXAMPLE 2 FOR num% = 1 TO 7 STEP 2 total%=total%+num% NEXT PRINT total%


Where can find hobo 1 to 5 all codes?

HOBO codes CODE 1=superhobo CODE 2=superdogs CODE 3=superpark CODE 4= pussycat HOBO 2 PRISONBRAWL CODES CODE 1=DROPSOAP CODE 2=EXODUS CODE 3=PRISONBREAK HOBO 3 WANTED CODES CODE 1=ULTRAHOBO CODE 2=ULTRABURGERS CODE 3=BOTTLES CODE 4=ULTRABOTTLES CODE 5=GUNS HOBO 4 TOTAL WAR CODES CODE 1=HOTSHOTS CODE 2=RAMBOHOBO CODE 3=RAMBOSHOTS CODE 4=WARBO CODE 5=RAMBOWARBO CODE 6=CITYJUNGLE HOBO 5 SPACE BRAWLS CODES CODE 1=Bubbles CODE 2=Alienfun CODE 3=Clonewars CODE 4=SUPERHOBO


How do you print in c 1 2 3 4 5 6?

Any of the following are snippets of code providing some ways of doing it: printf("1 2 3 4 5 6"); write(0, "1 2 3 4 5 6", 11); puts("1 2 3 4 5 6"); for (i = 0; i++ &lt; 5; printf("%d ", i); printf("%d", i); for (i = 0; ++i &lt; 6; putchar(' ')) putchar('0' + i); putchar('0' + i);


Write a java program to print the following output using the for loop 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5?

12345 1234 123 12 1


What is the firing order for 2005 Chevy Impala?

3400 (LA1) Code E Engine: 1-2-3-4-5-6; 3800 (L36) Code K Engine: 1-6-5-4-3-2; 3800 (L67) Code 1 Supercharged Engine: 1-6-5-4-3-2.....


What is the firing order for a 2005 Chevy Impala?

3400 (LA1) Code E Engine: 1-2-3-4-5-6; 3800 (L36) Code K Engine: 1-6-5-4-3-2; 3800 (L67) Code 1 Supercharged Engine: 1-6-5-4-3-2.....


What is the code for a Hyundai stereo?

1 - 2 - 3 - 4 - 5


How do you open the brief case on pupzzle?

you putt the code in 5 3 2 1 2 1 3


Bubble blast valentine 1-69 cheat code?

3-3...3-3....3-3....3-4.....5-3.....5-3....


How do you generate 1 22 333 4444 55555 series in qbasic?

REMPATTERNS (not necessary) CLS FOR I = 1 TO 5 STEP +1 FOR J = 1 TO I STEP+1 PRINT J NEXT J PRINT NEXT I END Hope you find this helpful :)


How do you print kamal kama kam ka k this pattern in qbasic?

Cls Dim n as string Dim b as string b=&quot;Kamal&quot; For a=5 to 1 step -1 n=left$(b, a) Print n Next a End