QUESTION DESCRIPTION :
TEST CASE 1
The integer variant of 12.01 is=12
TEST CASE 2
The integer variant of 23.00 is=2
EXPLANATION :
The objective of this code is to accept a float value from the user and print its integer counterpart.
ALGORITHM :
Write a program to convert a floating point number into corresponding integer
Input and Output Format:
Refer sample input and output for formatting specification.
All float values are displayed correct to 2 decimal places.
All text in bold corresponds to input and the rest corresponds to output.
Input and Output Format:
Refer sample input and output for formatting specification.
All float values are displayed correct to 2 decimal places.
All text in bold corresponds to input and the rest corresponds to output.
INPUT
12.01
OUTPUT
The integer variant of 12.01 is=12
TEST CASE 2
INPUT
23.00
OUTPUT
The integer variant of 23.00 is=2
The objective of this code is to accept a float value from the user and print its integer counterpart.
ALGORITHM :
- Accept a float value from the user ( f )
- Convert the float value to integer ( Type Casting )
- Print the output value in the required format.
CODE |
No comments:
Post a Comment