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

  Validation and event handling in javascrip

To complete this project you will write and submit one HTML file containing embedded CSS and JavaScript. The file will be called lab2.html. This file contains a registration form, which can be styled any way you like subject to the requirements be..

  The api for this class ispublic void poweronnbsp sets the

the api for this class ispublic void poweronnbsp sets the machine ready to serve the selected ice creampublic void

  Java assignment

Java Assignment

  Write a java program that declares an array alpha

Write a java program that declares an array alpha to 50 elements of type double. Initialize the array so that the first 25 numbers are equal to the square of the index variable, and the last 25 elements are equal to 3 times the index variable. Output..

  Prompt the user to enter a positive integer

Create a project called Daily8. Add a C source file to the project named daily8.c. Write a program that  will prompt the user to enter a positive integer.

  Write a program computehalf.java

Write a program ComputeHalf.Java that asks the user to a string. Write a method secondHalf that returns the second half of the input string.

  Create a program that will simulate the child''s number guess

Create a program that will simulate the child's number guessing game with two players

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Compilation and Execution - JAVA problem

Style marks are based on how your submitted code looks. Remember that good code is easily readable (and understandable) by someone who did not write it. For assignments, you should also include your name, student number, what course this is, what ass..

  Write a complete java program to simulate ahmed''s show

Suppose you're on a game show and you're given the choice of three doors. Behind one door is a car; there is nothing behind the others. The car and is placed randomly behind the doors before the show. The rules of the game show are as follows:

  Values that occur just once

This list has some values that occur just once (1, 3, 4, 11, 13, 18), some values that occur twice (9, 16), some values that occur three times (14, 19) and a single value that occurs four times (7). Therefore, the call of list.maxCount() should re..

  Write a script that simulates a casino machine

Write a script that simulates a casino machine. To play a single round on the machine user pays $ 5. Now when the user start the machine, the machine rolls a pair of dice

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