Really stuck on how to start this program

Okay, I know I should be posting some code here and showing where I've started and such, but I'm pretty lost as to how to start this program. Here's the problem:
2. Making Change:
This application, named ChangeMaker, will take as input a product price and an amount paid,
both floating-point numbers representing euro and cent amounts. The application computes and prints the amount of change due the user, and also expresses the change amount in number of 2-euros, 1-euro, 20-cent, 10-cent, 5-cent, 2-cent, and1-cent coins.
(Assume no change is given in bills, only in coins.)
For example:
Enter product price: 2.32
Enter amount paid: 5.00
Your change is 2.68 euros
1 x 2 euro
3 x 20-cent
1 x 5 cent
1 x 2 cent
1 x 1 cent
You can assume that the amount paid is greater than the product price, and that both inputs are
"euro and cent" amounts: positive numbers with at most two decimal places.3
Now, I know how to print the line asking for product price and enter amount paid, but I cannot figure out how to set up the rest of the code when switching from american USD dollars/coins to euros. I looked up the conversions and they are just intimidating as all get out when trying to take the equivalency of euros to each dollar thats entered and then taking the rest of the USD remainders and represent that in USD coinage. >.< Help is much appreciated thank you.

thomas.behr wrote:
random0munky wrote:
... when switching from american USD dollars/coins to euros. I looked up the conversions and they are just intimidating as all get out when trying to take the equivalency of euros to each dollar thats entered and then taking the rest of the USD remainders and represent that in USD coinage.Uhm, your requirement doesn't say anything about converting between USD and EUR. For starters, just write the program without any currency information at all. (That is only flavour anyways.)
For example:
Enter product price: 2.32
Enter amount paid: 5.00
Your change is 2.68
1 x 2
3 x 0.2
1 x 0.05
1 x 0.02
1 x 0.01That deception would never fly in a Red State -- 20 cent piece? 2 cent piece? 2 dollar coin? All this smacks of Socialism!

Similar Messages

  • Download photoshop cc and it get stuck at 2%  -  DSL Download at 6 Mbps - How big is this program and why is it frozen at 2%

    download photoshop cc and it get stuck at 2%  -  DSL Download at 6 Mbps - How big is this program and why is it frozen at 2%

    Jimk88 I would recommend reviewing the download logs to determine the exact error.  You can find details on how to locate the download logs at Error downloading Creative Cloud applications - http://helpx.adobe.com/creative-cloud/kb/error-downloading-cc-apps.html.

  • HI, i m new as a muze user for website creation. can anyone plz help me how to start this.

    HI, i m new as a muze user for website creation. can anyone plz help me how to start this.

    How exactly did you shut down your laptop? Not a hard restart (holding down the power button), I hope... if that's the case, then it is extremely unlikely the file is still intact on your computer. If it is, it would be an image on your RAM, and it is time-and-resource-intensive to recover it if it is even there. RAM memory is disposable and always being written over. Sorry dude...
    If it wasn't a hard restart, Keynote should have made a backup, unless you 'Force Close'd it.
    It really all depends on how your mac was shut down.

  • My safari browser seems to have been taken over by a malicious program called only-search.  Does any one know how to uninstall this program from safari?  I am running osX 10.10.

    My safari browser seems to have been taken over by a malicious program called only-search.  Does any one know how to uninstall this program from safari?  I am running osX 10.10.

    There is no need to download anything to solve this problem.
    You may have installed the "VSearch" trojan. Remove it as follows.
    Malware is always changing to get around the defenses against it. These instructions are valid as of now, as far as I know. They won't necessarily be valid in the future. Anyone finding this comment a few days or more after it was posted should look for more recent discussions or start a new one.
    Back up all data before proceeding.
    Step 1
    From the Safari menu bar, select
              Safari ▹ Preferences... ▹ Extensions
    Uninstall any extensions you don't know you need, including any that have the word "Spigot," "Trovi," or "Conduit" in the description. If in doubt, uninstall all extensions. Do the equivalent for the Firefox and Chrome browsers, if you use either of those.
    Reset the home page and default search engine in all the browsers, if it was changed.
    Step 2
    Triple-click anywhere in the line below on this page to select it:
    /Library/LaunchAgents/com.vsearch.agent.plist
    Right-click or control-click the line and select
              Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.* A folder should open with an item named "com.vsearch.agent.plist" selected. Drag the selected item to the Trash. You may be prompted for your administrator login password.
    Repeat with each of these lines:
    /Library/LaunchDaemons/com.vsearch.daemon.plist
    /Library/LaunchDaemons/com.vsearch.helper.plist
    Restart the computer and empty the Trash. Then delete the following items in the same way:
    /Library/Application Support/VSearch
    /System/Library/Frameworks/VSearch.framework
    ~/Library/Internet Plug-Ins/ConduitNPAPIPlugin.plugin
    Some of these items may be absent, in which case you'll get a message that the file can't be found. Skip that item and go on to the next one.
    The problem may have started when you downloaded and ran an application called "MPlayerX." That's the name of a legitimate free movie player, but the name is also used fraudulently to distribute VSearch. If there is an item with that name in the Applications folder, delete it, and if you wish, replace it with the genuine article from mplayerx.org.
    This trojan is often found on illegal websites that traffic in pirated content such as movies. If you, or anyone else who uses the computer, visit such sites and follow prompts to install software, you can expect more of the same, and worse, to follow.
    You may be wondering why you didn't get a warning from Gatekeeper about installing software from an unknown developer, as you should have. The reason is that the Internet criminal behind VSearch has a codesigning certificate issued by Apple, which causes Gatekeeper to give the installer a pass. Apple could revoke the certificate, but as of this writing has not done so, even though it's aware of the problem. This failure of oversight has compromised both Gatekeeper and the Developer ID program. You can't rely on Gatekeeper alone to protect you from harmful software.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
              Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.

  • How to program a midi foot controller on Mainstage? Does anyone knows how to program the foot controller with exclusive solo channel in order not to dance "tip tap" while from clean guitar I go to crunch or solo? How to do this programming on Mainstage?

    How to program a midi foot controller on Mainstage? Does anyone knows how to program the foot controller with exclusive solo channel in order not to dance "tip tap" while from clean guitar I go to crunch or solo? How to do this programming on Mainstage?
    I basically managed to learn how to invert parameters which allows me to be as default in the clean guitar channel and if I switch the first button on the midi foot controller I switch to crunch, but at this point I tryied so hard to programm the second and third button to switch, only through a button in one step, to a third channel for distorsion or a 4th channel for solo guitar but I couldn't figured out how this work can be done!
    I would appreciate if anyone could help or share this experience with others who are experiencing the same problem.
    Cheers.
    F.

    I cannot seem to get mainstage to recognize my FCB either. I am using IFCB. Anyone figure this out?
    Thanks,
    Eric

  • I registered my new iPhone 5s to my usual Apple ID, however it isn't showing in my devices when I log in. I tried to register it by adding a new device, but it tells me it's already registered to a different Apple ID. I'm really not sure how to fix this.

    I registered my new iPhone 5s to my usual Apple ID, however it isn't showing in my devices when I log in. I tried to register it by adding a new device, but it tells me it's already registered to a different Apple ID. I'm really not sure how to fix this. I only have the one Apple ID and the phone is brand new, purchased directly from Apple.
    When I check on the phone itself (iCloud and App Store settings) the Apple ID is correct. I'm not sure where else to check.
    Whilst setting up the phone, it prompted me to register, which I did. Then when connecting to my laptop through iTunes it prompted me again so I registered again. I even got a confirmation email to the email address associated with my Apple ID that the registration was successful.
    How can I add my iPhone 5s to the list of devices on the correct Apple ID?
    Thanks in advance for any advice.

    Found the answer to my question after posting (in related discussions)
    https://discussions.apple.com/message/12331666#12331666
    Will call Apple Care as soon as I can.

  • After my phone 4 was upgraded to iOS 5, my iphone 4 has been getting slower and slower. It's really annoying. How to solve this problem?

    After my phone 4 was upgraded to iOS 5, my iphone 4 has been getting slower and slower. It's really annoying. How to solve this problem?

    hi Allan,
    Can't make or receive any calls. When making a call, you see the thing dialing but no tone, it rings at he other end however. When somebody trying to call me, it does not ring at my end. If you try to end the call, the phone page will just freeze, when you exit the phone page to go try the MP3 player for example, and come back, the phone is still trying to end the previous call. I tried resetting the network settings, turn the phone off and on , no difference at all. It's easter Sunday, everything is closed here in Montreal.

  • [SOLVE] How to install this program (PyIpChanger)?

    Hello!
    I'm new to the forum and I wanted you to help me how to install this program.
    https://otland.net/threads/pyipchanger- … ts.157953/
    It is a ip changer for Tibia, to play in OT servers.
    Since there does not exist in the official repositories nor in the AUR, It is necessary install manually, but I can't figure out
    *Sorry my english, I'm not a native speaker.
    Best wishes!
    Last edited by Rearis (2015-05-10 14:52:48)

    Robg told you how to do this:
    robg wrote:
    Just use pacman to install: pyhon2, python2-pyqt4
    After having done that, you can run main.py using pyhon2.
    So install the software, then run:
    python2 PyIpChanger.py
    Last edited by mrunion (2015-05-07 13:36:31)

  • Really need help on how to write this program some 1 plz help me out here.

    i am new to java and i confused on how to be writing this program.
    i have completed the Part 1 but i am stuck on Part 2 & 3 so it would would be really great if any 1 could help me out on how to write the program.
    Part I
    An algorithm describes how a problem is solved in terms of the actions to be executed, and it specifies the order in which the actions should be executed. An algorithm must be detailed enough so that you can "walk" through the algorithm with test data. This means the algorithm must include all the necessary calculations.
    Here is an algorithm that calculates the cost of a rectangular window. The
    total cost of a window is based on two prices; the cost of the glass plus the cost of the metal frame around the glass. The glass is 50 cents per
    square inch (area) and the metal frame is 75 cents per inch (perimeter).
    The length and width of the window will be entered by the user. The
    output of the program should be the length and width (entered by the user)
    and the total cost of the window.
    FORMULAS:
    area = length times width perimeter = 2 times (length plus width)
    Here is the corresponding algorithm:
    read in the length of the window in inches
    read in the width of the window in inches
    compute the area
    compute the cost of the glass (area times 50 cents)
    compute the perimeter
    compute the cost of the frame (perimeter times 75 cents)
    compute the total cost of the window (cost of glass plus cost of frame)
    display the length, width and total cost
    The next step would be to "desk check" the algorithm. First you would need to make up the "test data". For this algorithm, the test data would involve making up a length and a width, and then calculating the cost of the window based on those values. The results are computing by hand or using a calculator. The results of your test data are always calculated before translating your algorithm into a programming language. Here is an example of the test data for the problem given:
    length = 10
    width = 20
    area = 200, glass cost= 100.00 (area times 50 cents)
    perimeter = 60, frame cost = 45.00 (perimeter times 75 cents)
    total cost =145.00
    Once the test data is chosen, you should "walk" through the algorithm using the test data to see if the algorithm produces the same answers that you obtained from your calculations.
    If the results are the same, then you would begin translating your algorithm into a programming language. If the results are not the same, then you would attempt to find out what part of the algorithm is incorrect and correct it. It is also
    necessary to re-check your hand calculations.
    Each time you revise your algorithm, you should walk through it with your test data again. You keep revising your algorithm until it produces the same answers as your test data.
    ?Now write and submit a Java program that will calculate the cost of a rectangular window according to the algorithm explained. Be sure to prompt for input and label your output.?
    Part II
    Write, compile and execute a Java program that displays the following prompts:
    Enter an integer.
    Enter a second integer
    Enter a third integer.
    Enter a fourth integer.
    After each prompt is displayed, your program should use the nextint method of the Scanner class to accept a number from the keyboard for the displayed
    prompt. After the fourth integer has been entered, your program should calculate and display the average of the four integers and the value of the first integer entered raised to the power of the second integer entered. The average and result of raising to a power should be included in an appropriate messages
    (labels).
    Sample Test Data:
    Set 1: 100 100 100 100
    Set 2: 100 0 100 0
    Be sure to write an algorithm first before attempting to write the Java code. Walk through your algorithm with test data to be sure it works as anticipated.
    Part III
    Repeat Part lI but only calculate the average, not the power. This time, make sure to use the same variable name, number, for each of the four numbers input. Also use the variable sum for the sum of the numbers. (Hint: To do this, you may use the statement sum = sum + number after each number is read.)
    For Part 1 this is what i got
    import java.util.Scanner;
    public class Window
         public static void main(String[] args)
              double length, width, glass_cost, perimeter, frame_cost, area, total;
              Scanner keyboard = new Scanner (System.in);
              System.out.println("Enter the length of the window in inches");
              length = keyboard.nextInt();
              System.out.println("Enter the width of the window in inches");
              width = keyboard.nextInt();
              area = length * width;
              glass_cost = area * .5;
              perimeter = 2 * (length + width);
              frame_cost = perimeter * .75;
              total = glass_cost + frame_cost;
                   System.out.println("The Length of the window is " + length + "inches");
                   System.out.println("The Width of the window is " + length + "inches");
                   System.out.println("The total cost of the window is $ " + total);
         Enter the length of the window in inches
         5
         Enter the width of the window in inches
         8
         The Length of the window is 5.0inches
         The Width of the window is 5.0inches
         The total cost of the window is $ 39.5
    Press any key to continue . . .
    Edited by: Adhi on Feb 24, 2008 10:33 AM

    Adhi wrote:
    i am new to java and i confused on how to be writing this program.
    i have completed the Part 1 but i am stuck on Part 2 & 3 so it would would be really great if any 1 could help me out on how to write the program.Looks like homework to me.
    What have you written so far? Post it.
    Part I
    An algorithm describes how a problem is solved in terms of the actions to be executed, and it specifies the order in which the actions should be executed. An algorithm must be detailed enough so that you can "walk" through the algorithm with test data. This means the algorithm must include all the necessary calculations.
    Here is an algorithm that calculates the cost of a rectangular window. The
    total cost of a window is based on two prices; the cost of the glass plus the cost of the metal frame around the glass. The glass is 50 cents per
    square inch (area) and the metal frame is 75 cents per inch (perimeter).
    The length and width of the window will be entered by the user. The
    output of the program should be the length and width (entered by the user)
    and the total cost of the window.
    FORMULAS:
    area = length times width perimeter = 2 times (length plus width)
    Here is the corresponding algorithm:
    read in the length of the window in inches
    read in the width of the window in inches
    compute the area
    compute the cost of the glass (area times 50 cents)
    compute the perimeter
    compute the cost of the frame (perimeter times 75 cents)
    compute the total cost of the window (cost of glass plus cost of frame)
    display the length, width and total cost
    The next step would be to "desk check" the algorithm. First you would need to make up the "test data". For this algorithm, the test data would involve making up a length and a width, and then calculating the cost of the window based on those values. The results are computing by hand or using a calculator. The results of your test data are always calculated before translating your algorithm into a programming language. Here is an example of the test data for the problem given:
    length = 10
    width = 20
    area = 200, glass cost= 100.00 (area times 50 cents)
    perimeter = 60, frame cost = 45.00 (perimeter times 75 cents)
    total cost =145.00
    Once the test data is chosen, you should "walk" through the algorithm using the test data to see if the algorithm produces the same answers that you obtained from your calculations.
    If the results are the same, then you would begin translating your algorithm into a programming language. If the results are not the same, then you would attempt to find out what part of the algorithm is incorrect and correct it. It is also
    necessary to re-check your hand calculations.
    Each time you revise your algorithm, you should walk through it with your test data again. You keep revising your algorithm until it produces the same answers as your test data.
    &#147;Now write and submit a Java program that will calculate the cost of a rectangular window according to the algorithm explained. Be sure to prompt for input and label your output.&#148;
    Part II
    Write, compile and execute a Java program that displays the following prompts:
    Enter an integer.
    Enter a second integer
    Enter a third integer.
    Enter a fourth integer.
    After each prompt is displayed, your program should use the nextint method of the Scanner class to accept a number from the keyboard for the displayed
    prompt. After the fourth integer has been entered, your program should calculate and display the average of the four integers and the value of the first integer entered raised to the power of the second integer entered. The average and result of raising to a power should be included in an appropriate messages
    (labels).
    Sample Test Data:
    Set 1: 100 100 100 100
    Set 2: 100 0 100 0
    Be sure to write an algorithm first before attempting to write the Java code. Walk through your algorithm with test data to be sure it works as anticipated.So this is where you actually have to do something. My guess is that you've done nothing so far.
    Part III
    Repeat Part lI but only calculate the average, not the power. This time, make sure to use the same variable name, number, for each of the four numbers input. Also use the variable sum for the sum of the numbers. (Hint: To do this, you may use the statement sum = sum + number after each number is read.)Man, this specification writes itself. Sit down and start coding.
    One bit of advice: Nobody here takes kindly to lazy, stupid students who are just trying to con somebody into doing their homework for them. If that's you, better have your asbestos underpants on.
    %

  • I hooked up mine and finally got it to work but every once in a while my web browser get stuck.  how di fix this?

    i hooked up mine airport and finally got it to work but every once in a while my web browser gets stuck.  how di fi?

    Wow that was really quick, thank you so much.  Im not sure at all which version it was because i said it was around 4 years ago he bought it.  I know it isn't under his username, since he's a PC person (ugh) so i know its probably registered to one of our actual names.  isn't there some way to look it up since we did register it, because I'm not even sure where the disks are from when we bought it (we've moved a lot and also have two storage lockers, i know i would have kept it with other disks) but my cd rom drive is actually broken on my computer as well ( i think it got stepped on and is now squished and won't eject or run disks.)
    So is there anyway they can look up that its registered to one of our names since we did register it when we bought and installed it, or do i really have to find the disk with some sort of proof of purchase (i know there would be no receipt after all this time)
    either way, ill do what you suggested to the best of my abilities and thank you so much for answering my questions, i can't even open the program as its incompatible and find out the info from that) so I'm in a bit of a pickle and your response was so thorough and it didn't seem to be posted long enough to even write a well researched response, thanks, all the best,
    sarucia

  • How to do this program?

    Hi all.
    I would like some help on how to create a program.  Im still very new to the Labview program so any help would be greatful.
    Now granted that, heres my issue, ive got an assignment for a class that i have no idea where to start.
    Heres the assignment:
    You have a discount coupon that gives you a ten cent per gallon discount up to 15 gallons.
    You purchase regular gas which is priced at $3.56 a gallon, you give the clerk $30.00 to purchase that much in gas.  After applying the discount, how much would you actually have to pay?
    For the controls and indicators, i need to show the Amount Tendered, the Discount, Gallons purchased, the Final Price and Discount Amount.
    As ive said above, i have no idea where to start with this.
    THanks all.

    lorddd337 wrote:
    Actually i dont have the math worked out as of yet since i have no idea how to do the math that will apply to the program.
    Then you need to work out the math first. This has nothing to do with LabVIEW or programming.
    For each terminal, decide if it is an input (something the user controls) or an output (something the program will calculate based on the values of the other controls). Have you done that?
    lorddd337 wrote:
    Also i dont know which tutorial would work for this.
    Whatever you just learned in class is probably sufficient. Else start the tutorials in order to learn the basics.
    LabVIEW Champion . Do more with less code and in less time .

  • How to solve this program?

    Recently I get this work:
    I need to write one program in Java that running on local or internet browser that can connect to database. This database is located on LAN or Internet database server. This database contain information about machine type, price, status, department, owner, history of used, services served.
    This is multi-user program that many user can using it on one time. Depend on the right of user, he can update, delete these information or not. So if user has right, he can delete and update information. And this program also has tools that user can list type of machine, the number of person on departments, machine configuration, history of working and upgrading; used resourses.
    For example, I want to find how many server HP 3000 that my conpany own, who or which department use, status of them.
    How can I solve? If you have experince in this kind of program, please help me.

    Thanh,
    if the application must be able to run locally and in a web browser then you have the following options:
    Swing: Use ADF JClient and create an Applet that runs stand alone. Thsi way you can sue the web browser to show the Apllet while others run it stand alone as an application
    Swing/JSP: You create one model for the business logic and two views. The ADF JClient view as a Java application to run stand alone on local clients and a JSP client for the web. Its a bit more work to do because you are creating two views, but the result may be worth the effort.
    Question the need for local client: If nobody uses a local database, what's the purpose of having an application that runs locally if not the requirement is for desktop integration? In this case I would create a client for the web browser only.
    Frank

  • My adobe acrobat X1 pro, keeps jamming up? Any ideas how i redownload this program?

    I bought this program, but it keeps locking up. I run my computer with win8.1 and previously I had no problems with it, but now it is locking up and wont do anything.
    Is it possible to re-download it from anywhere? I can't seem to find it!

    Hi Martyn ,
    Please refer to the following link.
    https://helpx.adobe.com/acrobat/kb/acrobat-downloads.html
    Let us know if this helps or not.
    Regards
    Sukrit Dhingra

  • Help- I have no idea how to use this program.

    Hi All,
    I am really at a loss at the moment. I am hoping to create a flash document for work in order to present an idea I have. What I am basically wanting to do is to create an interactive workbook for clients on occupational health and safety.
    The problem is, I can visualise what I want but just cannot work out this programme (i mean to the extent I don't even know how to pull in the documents I want) let alone make it interactive.
    I know this is a long shot but is there anyone willing to help me get started with this???
    Thanks,
    Tianna

    check flashbuilder.  it's a program that's easier to use than flash pro and which you can use to create swf projects, too.

  • How to start JDBC program from web.

    Okay I have researched this alot on how you are suppose to connect to a database using JSP and all the example just show how to print the entire database. What I need to do is take a JDBC program I have written and make it run on a web page. How can I call the program to run on a web page. The JDBC program will search,update,add information into a database but how do I get the JDBC program run on a web server. I am a newbie in JSP.

    Then could someone tell me what is the point in learning JDBC if you can't use it for web applications? Could someone then tell me which to learn in order for me to implement using my database on the web. Should I learn how to do it as a servlet or in JSP. Which is going to require less time to learn. I am kinda in a time crunch on this one. I would really like to learn both and I will probably go back and do that but I don't have time to learn both so any advice would be helpful. Thank you for you time.

Maybe you are looking for

  • Struggling to get a signal from my Midi Keyboard

    I have Logic Pro X and a couple of weeks ago managed to successfully connect up by Korg Workstation to act as a Midi Keyboard so that I could access the library and play the sounds in real time  through the keyboard. I have just moved my studio to a

  • Captivate 4 - Use the mouse and keyboard at the same time.

    Hello, good people. There is a way, in C4, to use the mouse and the keyboard at the same time? An example, in software simulation: "Hold the Shift key and click with the mouse in the other object to select it too..."

  • HELP!! has this happened to anyone ...?

    Please help!!! my email has been going haywire   next to one of my email accounts when you click on mail...has random numbers next to it.  tried to hard reset it--still there.  deleted the email account and re-added it -- still there . ugh! has anyon

  • SOMEONE PLEASE HELP ME WITH UPGRADING TO ITUNES LATEST VERISON?!?!

    I'm trying to upgrade itunes 7.0.2 but it wont let me I wait for hours but it doesnt do anything all it does is just stay there and i spent a week just trying to upgrade it but i'm out of ideas I have an itunes gift card and i cant download music unt

  • Write offs in AR

    is there any configuration needed to do write offs? what is the transaction used to to write off in SAP FI? If it is f-32, then do we jsut process it because when i doit, i have to ener the debit and credit side 40 and 50 and the respective accoutns