View Single Post
Old 11-30-2004, 02:47 PM   #1 (permalink)
cloud
cloud's Avatar
 
Super Techie

Join Date: Nov 2004

Posts: 406

cloud is on a distinguished road

Talking Yet another C program....

sorry to keep posting these things, but my teacher just sort of threw me into C, and I'm having trouble. Here' s my problem:

I have to make a program that takes a number from the user , between 0-12. Then posts a string of numbers from 0 to that number. example, if the user puts in 5, it will give:

0
0 1
0 1 2
0 1 2 3
0 1 2 3 4
0 1 2 3 4 5

Then it stays open and continues until the user puts in a number not between 0-12 then it terminates.

I've been trying and the best i can get is if i put in 5 it gives me:
012345

I've been workin on it for a long time and i'm really getting frustrated.:mad:

Any advice will be welcome, and sorry for all the qestions.
__________________
antec nine hundred
abit IP35 pro
Q6600 @ 3.3ghz
Evga 8800GTX
4GB Corsair XMS 800
150gb WD 10k
300gb seagate 7.2k
22" Samsung 5ms lcd
21" Sceptre lcd
cloud is offline