Product with Float
mediumQuestion 10Create an int variable with the value 5 and a float variable with the value 2.5f. Multiply them together and use printf to display the output shown in Expected Output.
Use %d for the integer, and %.2f for both float values (the original float and the result). The result of multiplying an int and a float is a float.
Expected output
5 x 2.50 = 12.50= newline. No newline after the last line.
Hints4 available
Sign in to use hintsTopics
Printing
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (p, fori)
Your output
Run your code to see the output here...
Test cases
Run your code to see test case results.