OpenMRS
Finding Square root of the input value - Java Beginners task
This task will prepare you and your environment for the Java-based Developments.
If you don't have Java in your computer, please follow these instructions to install and configure (We just mentioned the steps, you need to Google it and find the exact ways).
- Download the Java from the official website
- Install and configure with your environment
- You can use any type of IDE or environment for the coding (eg : notepad, text pad, eclipse, etc). So download and install those
- Configure the IDE with Java environment
Now you should write the following program on simple Java Code, and submit it for the evaluations.
Task : Your Java program should ask to insert a numeric number on the terminal/screen, and then it should print the square root value of that number in two decimal places.
- Sample Input : 4
- Sample Output : 2.00 (note round to two decimal places)
You are expected to handle the (if any of these are needed),
- Java I/O basic (get input/print output)
- Use mathematical functions to calculate square root and decimal places
- Comments
- Exception handling (Consider the case where the user may enter a character. This may cause an exception. If so, deal with it appropriately using try/catch)
Submission steps
- You need to submit the screenshot of your running code (it should indicate the java commands, getting input, and the output
- Paste your code into a new Gist and submit for the evaluations
Task tags
Students who completed this task
Kapil, Smit Rambhia, qk313, shakeelsamsu, Byte.2, NastyGamer, namandhingra19, Eddie2600, Gops, Kirmartyuk, Murph45, ShubhamShakyawal, Krzysztof MizgaĆa, Zizhen Guo, Satori Dvesha, JoeyP123, gokceduzyol, Anuj Kumar, 02zchen, IZKA, Akshat G, Raman, akshi04, nicholasv, Nikodem Bernat, byte.1, Shakthi, Ttonyxx, samald4, Sylvia, Mr_Penguin321, Devaa, AirWolfXD, yannismate, AdnanSayyed, Hdinh77, Kgo, Cooder, bconzore, kgauld1, why-does-ie-still-exist, VETRIVEL M.D, Swetaa23, Vilaksh, marcin.kowalczyk, Swapnilp01, Aminul, Stealthfungus25, H33won, Sashreek, Aryu, Daniel Chamoun, ananyarao28, IK, Aditya13, symt, Silver-Core, deleteyboi, Neverger, Dashora7, Murageh, iperez, lana, ant15, Coding Cook, Alpha, aviralReaper, Apple Sauce, KevinX, ligaydima, iTeije, w80707, Nightmaze, Prafulla, aranyoray, KevinSu2020, JLO, Liuminous, Smalec, ArchitHax