There are times when your answer is a floating point that contains undesired amount of digits after decimal. Here, we'll learn how to get a precise answer out of a floating number. You are given two floating numbers a and b. You need to output a/b and decimal precision of a/b upto 3 places after decimal point.
Note: You may use System.out.format()
First line of input conatins number of testcases T. For each testcase, there will be one line of input containing a and b separated by a space.
For each testcase, print the required output in a new line.
Your task is to complete the provided function printInFormat().
1 <= T <= 10
1 <= a, b,<= 100
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.