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.
Any advice will be welcome, and sorry for all the qestions.
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.
Any advice will be welcome, and sorry for all the qestions.