Create a class called DigitSeparator. This class will only have one function called separator. Function separator will have ONE parameter of type long int which will be used to accept a six-digit number. Function separator will take the number passed to the parameter and separate it into its individual digits, multiply each separated digit by 2 and then print the digits separated from one another by three spaces each. (Hint: use a combination of integer division and modulus division to split the number into digits.) Create a driver program that will contain a main function that will create a DigitSeparator object and then call its separator function. Function main should ask the user for a number, and then pass this number to the function separator.
Can anyone help me creat this class new to programming and I have no Idea how to start.
Red Flag Submitted
Thank you for helping keep Tek-Tips Forums free from inappropriate posts. The Tek-Tips staff will check this out and take appropriate action.
Reply To This Thread
Posting in the Tek-Tips forums is a member-only feature.