Here's my understanding fetching the input:
int num = 0;
NSLog (@"Input 5 numbers");
scanf("%d", &num);
NSLog (@"\n You inputted: %d !", num);
Sample Input: 54321 Output: 54321
But the output should be:
5
4
3
2
1
Here's my understanding fetching the input:
int num = 0;
NSLog (@"Input 5 numbers");
scanf("%d", &num);
NSLog (@"\n You inputted: %d !", num);
Sample Input: 54321 Output: 54321
But the output should be:
5
4
3
2
1
You will need to convert the number into a character array and then loop through it, outputting each character at a time.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.