This is a fairly simple thing to do, with a large variety of ways of completing it. A very simple solution I thought of would use 2 std::string classes if you are able to use them.
example (incomplete of course ):
Code:
#include <iostream>
#include <string>
/*
Goal:
1) Type a random integer
i.e. 123
2) Parse and produce the remaining values from 0-9
i.e. 0456789
*/
//This is a quick rough solution
int main()
{
std::string numbers = "0123456789";
std::string input;
std::cout << "Input a Number: ";
std::getline(std::cin,input);
for ( int x = 0; x != input.length(); ++x )
{
for ( int y = 0; y != numbers.length(); ++y )
{
//Use this to possibly flag the numbers string to manipulate output below
/* if block with subscript assignment would be a good choice */
}
}
std::cout << "Leftover Output: ";
for ( int x = 0; x != numbers.length(); ++x )
{
//Think of how to use this in conjunction with the above loop to display the output
/* if block with subscript output would be a good choice */
}
std::cout << "\n";
system("pause");
}
You could do the same kind of thing with cstring style if you are not allowed to use std::string at this point in your class.
edit:
of course there is not any range checking, or checking for incorrect input.