write a program that prompts the user to enter the length of an object in centimeters and finds and prints the length in centimeters ,meters ,and kilometers.
sample input/ output:
Enter the length in centimeters: 2346754
2346754 centimeters has 23 kilometers, 467 meters, and 54 centimeters
Hint: What is 12345 % 1000 ?
Try making a program and writing std::cout << (12345 % 1000) << std::endl;
Then, what is std::cout << (12345 / 1000) << std::endl;
Try it with 100 or 10 instead of 1000. You'll start to see a pattern.
Optionally, save a calculation into a variable using int a = 2346754 % 100;