Java | JSP | JSF Answers

Questions: 4 418

Answers by our Experts: 3 943

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

This one is a bit tricky. You're going to have to isolate each digit of the integer to determine which one is the largest, so good luck!





Instructions:



Input a 3-digit integer.


Print the largest digit in the integer.


Tip #1: Use % 10 to get the rightmost digit. For example, if you do 412 % 10, then the result would be the rightmost digit, which is 2.


Tip #2: On the other hand, use / 10 to remove the rightmost digit. For example, if you do 412 / 10, then the result would be 41.


Tip #3: You'd have to repeat Tip #1 and Tip #2 three times for this problem because the input is a 3-digit integer.


Write a java program to print all natural numbers in reverse(from n to 1) - using while loop

A descending order means values arranged from largest to smallest. But in your case, you're going to have to sort these integers in ascending order, which means from smallest to largest.




Instructions:

Input three integers.
Print the integers in ascending order using your knowledge on conditional statements.

Input

A line containing three integers separated by a space.

The cost to ship a package is a flat fee of 75 cents plus 25 cents per pound.

1. Declare a constant named CENTS_PER_POUND and initialize with 25.

2. Get the shipping weight from user input storing the weight into shipWeightPounds.

3. Using FLAT_FEE_CENTS and CENTS_PER_POUND constants, assign shipCostCents with the cost of shipping a package weighing shipWeightPounds.



Write a statement that assigns numCoins with numNickels + numDimes. Ex: 5 nickels and 6 dimes results in 11 coins.


Design notepad using swing controls.it should contain all options with their shortcut keys


Create a program which displays a menu “Menu” having menu items “First” & “Second”. When we click menu item “First”, it displays a dialog box with a Button “Hello”. When “Hello” button is clicked, it displays “Hello World”


Create a frame which include list and in this list section print table of any number and if user click exit the application get closed. 


Write a java program to find the sum of all even numbers between 1 to n - using while loop

Write a java program to print all even numbers between 1 to 100 - using while loop

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS