Given the code snippet of a calling function ->
Code the printWithComma () function starting here.
Two Sample Runs
Enter a number with up to 6 digits: 123456
The number with commas is: 123,456
Enter a number with up to 6 digits: 12
The number with commas is: 000,012
HINTS: ? fixed, showpoint, setprecision, fill ?
? right or left ? setw ?
int main()
{
// prototype
void printWithComma( int );
// variable
int number;
cout << " Enter a number with up to 6 digits: ";
cin >> number;
// call
printWithComma( number );
return 0;
}
Can anyone give me a clue as to what the body of this would go like this is what I have soo far..?
thanks guys...
1 2 3 4
|
void printWithComma (int number)
{
}
|