The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 2 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
50 Questions on Java with Solutions and Output. Level from basic to Advanced! Problem #1: Write a Java program to calculate sum of two numbers. Problem #2: Write a java program to prints the count of odd and even no’s entered. Problem #3: Write a program to convert the temperature given in Fahrenheit to Celsius using the following conversion formula C = F-32 / 1.8 and display the value in a tabular form. Problem #4: Write Java program to print the squares and cubes for the numbers 1 to 5. Problem #5: Write a java program to find the roots of a quadratic equation. Assign the values of a, b and c of the equations in the program itself. (Consider imaginary as well as real roots). Problem #6: Write a java program for finding the sum, difference, product, quotient, minimum and maximum of any two integers. Problem #7: Write a java program 'MyNumber.java" that performs following operations on a variable 'num' of type double: a) Finds the round value of 'num' and stores the result in a variable num Round of type double. b) Finds the ceil value of 'num' and stores the result in a variable num Ceil of type double. c) Finds the floor value of 'num' and stores the result in a variable num Floor of type double 1 d) Cast 'num' to type int and stores the result in a variable num Integer of type int. Display output of num Round, num Ceil, num Floor and num Integer on screen. Note: Test your program with following value of num num=56.764 num=36.432 Use Math.round, Math.ceil, Math.floor methods of class Math for1,2and3. Problem #8: Write Java program to show uses of allMath class methods. Problem #9: Write Java program to compute the sum of the2+4+6+---------+10. Problem #10: Write a java program that computes the sum of the reciprocals: 1/1 + 1/2 +1/3 +... +1/10 Problem #11: Shown below is a Floyd’s triangle 1 23 456 7 8 9 10 11 12 13 14 15 (a).Write a program to print this triangle. (b). Modify the program to producethe following form of Floyd’s triangle. 1 01 10 1 010 1 1010 1 Problem #12: Write a program using do...while loop to produce following sequence of Fibonacci numbers. 1 1 2 3 5 8 13 21 .................. And more questions.. See in Questions Pdf
Attachments:
Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â----------- Th-----------ank----------- Yo-----------u f-----------or -----------usi-----------ng -----------our----------- we-----------bsi-----------te -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill-----------