Tuesday, 21 February 2017

Float Division of numbers

QUESTION DESCRIPTION :

Harinis home work for fourth day is to divide two numbers, help Harini to solve the problem.


TEST CASE 1 

INPUT

7.2 3.4

OUTPUT

The Division of two number is:2.117647


EXPLANATION :

This is a simple problem which requires you to accept two numbers and then print the division of the first number by the second number. ( ImpDividing Two Integers Gives Integers )


ALGORITHM :
  • Take input from the user ( a,b )
  • As dividing two integers gives you an integer , you either need to parse ( Parsing ) it to float or take the input as float ( I took the input as float )
  • Divide the two numbers and print the result.( a/b )
SOLUTION : (Please use this as reference only)


CODE


No comments:

Post a Comment