Challenge: Convert a Floating Point Value into a Percentage Value

Here is a coding challenge to test your knowledge of formatted output.

We'll cover the following

Problem statement #

Write a program that converts a given floating point value into a percentage and displays it with two digits after the decimal mark.

Input #

1.2345

Output #

%1.23

Challenge #

This problem is designed for you to practice, so try to solve it on your own first. If you get stuck, you can always refer to the explanation and solution provided in the next lesson. Good luck!

Get hands-on with 1200+ tech skills courses.