Question: please use C++ and substr function Exercise 2: Comma Separating Thousands (This is essentially Exercise E2.12 of the book) Write a program comma.cpp that reads
please use C++ and substr function
Exercise 2: Comma Separating Thousands (This is essentially Exercise E2.12 of the book) Write a program comma.cpp that reads an integer between 1,000 and 999,999 from the user and prints it with a comma separating the thousands. Please have the output formatted exactly like the following examples: (the red is user input) Please enter an integer between 1000 and 999999: 2000 With comma separating thousands: 2,000 Please enter an integer between 1000 and 999999: 23456 With comma separating thousands: 23,456 Note: How does the substr function help you
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
