I want to extend the functionality of a part of a program that I'm working now..
Right now my code prints this on screen:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
...
1999
But I'm looking to do this: Putting the tens in text, without number. Also, numbering tens.
1
2
3
4
5
6
7
8
9
ten 1
11
12
13
14
15
16
17
18
19
ten 2
21
22
...
1999
But with the functions that I know of C, I can't figure how to do. Could do this with many ifs in the for, but do not want a code so extensive.
The code of the first output is this:
#include<stdio.h>
int main(void) {
int i, j=2000;
for(i=1;i<=j;i++)
{
printf("%d\n", i);
}
return 0;
}
Very simple, and I want to keep that.
IN SIMPLE WORDS: All numbers ending in 0, should be print "ten x", instead the number...
Thank you.
ten ten?