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

13y ago

What else can I help you with?

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%


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


Where can find hobo 1 to 5 all codes?

Oh, dude, finding Hobo 1 to 5 codes is like searching for buried treasure in a landfill. You can try scouring the internet for forums or cheat code websites, but honestly, who has time for that? Just play the game and embrace the chaos, man.


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 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 code for a Hyundai stereo?

1 - 2 - 3 - 4 - 5


Bubble blast valentine 1-69 cheat code?

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


How do you open the brief case on pupzzle?

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


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

QBASIC CODE/START... ==== ...QBASIC CODE/END.


How do you generate a series 1 3 5. using qbasic?

There are multiple ways to generate that particular string, several more than can be listed in one answer. For example: CLS PRINT "1 3 5" or CLS REM An easy "1 through 5, odds only" FOR loop. FOR X = 1 TO 5 STEP 2 PRINT X; NEXT X or even CLS INPUT "Please type in a number series with no line breaks (spaces okay):", numbers$ PRINT numbers$