Exchange the block of platinum for cash

Assignment Help JAVA Programming
Reference no: EM13906470

You have a block of platinum that can be exchanged in your bank either for cash or for smaller blocks of platinum. If you exchange a block of m grams, you get three blocks of weight m/2, m/3 and m/4 grams each. You don't get any fractional part, as the division process rounds down the value. If you exchange the block of platinum for cash, you get m units of currency. You can do any number of exchanges for smaller blocks or currency.

Given the value of a block in grams as input, write a program that would print the largest possible currency value that you can receive as the output. Assume that the maximum value of a block that can be given as an input is 1,000,000,000 grams and the minimum value is 2 grams.

Reference no: EM13906470

Questions Cloud

Segmenting consumer and business markets segmentation : Segmenting Consumer and Business Markets Segmentation bases (variables) are used to identify particular characteristics, attributes, or traits of consumers or businesses. Consumer markets are typically segmented using 5 bases, including geographic, d..
Calculate the stress at a point away from the hole : Calculate the stress at a point away from the hole, to the right of the beam toward the end and Calculate the stress at the hole?
Compute the daily wage of an employee : Write a JAVA program that will input Employee Name, Rate per hour, No. of hours worked and will compute the daily wage of an employee. If the number of hours worked exceeds eight hours add 30% to each excess hours as overtime rate.
Describe some of the personal and psychological factors : 1. Describe some of the personal and psychological factors that may influence what consumers buy and when they buy it. Ch. 3 2. Identify the ways in which business-to-business (B2B) markets differ from business-to-consumer (B2C) markets. Ch. 4
Exchange the block of platinum for cash : You don't get any fractional part, as the division process rounds down the value. If you exchange the block of platinum for cash, you get m units of currency. You can do any number of exchanges for smaller blocks or currency.
Mall survey staff administered a random survey to mall : As the food court manager at the Mall of Elbonia, you want to determine how much time customers spend at the mall related to different times of the week (for example: midweek, day; midweek evening; weekend, day; weekend, evening) . Last week the mall..
How a taxpayer could realize a gain but not recognize it : Rocky and Bullwinkle did not recognize gain related to the sale of the land on its tax return. Is this possible? Explain how a taxpayer could realize a gain but not recognize it.
Describe the channel systems used for the product offering : 1.Describe the channel systems used for the product offering of automobile insurance companies (i.e vertical marketing systme, what intermediaries are used, etc.)
Prepare a table that shows the computation of cash : All sales are on credit. Recent experience shows that 40% of credit sales is collected in the month of the sale, 35% in the month after the sale, 23% in the second month after the sale, and 2% proves to be uncollectible.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write a program that asks the user to enter three names

Write a program that asks the user to enter three names

  What is the smallest exponent

In storing number in a string of 16 bits, the first bit is used for the sign of the number, and the next 5 bits store the exponent plus the bias, and the remaining 10 bits store the mantissa. The bias is 15.

  Write program in java to calculate interest

Write a program in java to do the following : the following data is stored for each customer in the bank: account number,average balance and number of transaction for each customer it is required to calculate the interest earn

  The data-centric java agricultural image storing application

Develop and test a specified a data-centric Java application. The required application is described in the Agricultural Image storing application- case-study

  How do the two implementations differ

Give an example of a program that uses the non-generic version of a class from the Java collection framework and the equivalent program that uses the generic version.How do the two implementations differ?

  Design a program that extends the definition of the class

Design a program that extends the definition of the class JFrame to display a window on the screen. Name your class PropertyTax1, title your window "Calculation of Property Taxes," set the window's width to 400 pixels and height to 300 pixels, and te..

  What does the variable x contain

What does the variable x contain at the end of each of these computations? If the code is not legal in Java, say so.

  Rock-paper-scissors :- java problem

Design decision marks are based on how you implemented our programs/classes.

  Write a main method that will simulate playing the game

On the Monty Hall game show, a contestant is given a choice of three doors. Behind one door is a car and behind the other two doors are goats.

  Calculate the body mass index

Write an application (BMICalc) that reads the user's weight in poinds and height in inches, then calculates the Body Mass Index.

  Design 3 shoppingbay is an online auction service that

3. shoppingbay is an online auction service that requires several reports. design a flowchart or psuedocode this is

  Concepts of polymorphism

This lab introduces students to the concepts of polymorphism, early binding, late binding, abstract classes, and virtual class functions. This will be done in the context of performing calculations on basic geometrical shapes

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd