How can get a perfect exit?

I got a task to calculate the count the chocolate.

the task is;

A user is having some amount (A), rupee by chocolate (B), For Covers (C) chocolate.

for example, if a user with certain amount as Rs.10 in his hand and he wants to buy a chocolate by chocolate amount would be RS.1 means he can get 10 chocolates. If he returned 3 ways to choc.covers, he can get 1 shock instead of covers. Similarly, it is necessary to calculate how to shock a user can get?

I had done using the simple method I already knew. now I try with the help of loops to make the program with accurate results. It's little confuse me to follow these steps. Can anyone help me solve this problem by using loops or other it is easier that I had already done?

To go through the state machine example? http://www.NI.com/white-paper/3024/en/

Tags: NI Software

Similar Questions

  • How can get us a new operating system without having to buy one?

    Original title: Erased from the os

    My son has updated w 7 w 10 and somehow deleted the operating system. How can get us a new operating system without having to buy one?

    Hello

    Thank you for the update on the issue.

    Yes, you are right that DELL support should suggest your son even. But don't worry, finally, you are able to find the product key.

    Feel free to post on the forum if you have any concerns more associated with Windows. We will be happy to help you again.

    Kind regards

  • How can get a serial number

    How can get a serial number

    Adobe apps in the creative cloud no longer use serial numbers.

    Once you purchase a subscription, connect you to the designer Cloud Desktop App to download programs. As long as your user ID is associated with a valid subscription, the function of programs.

    Click here to take a subscription: pricing and membershipcreative cloud plans | Adobe Creative Cloud

    If you already have an earlier version of the program, pre creative cloud, you can find your serial number on your package or under your Adobe Id profile used to save the program.

    Adobe can't stand CC pre versions.

  • Recently I replaced my hard drive on my imac and now when I try to open Ps Id and another app for my CS4 I have error 150:30. How can get over this? Thanks much for any help.

    Recently I replaced my hard drive on my imac and now when I try to open Ps Id and another app for my CS4 I have error 150:30. How can get over this? Thanks much for any help.

    Hello

    Please see error "Licensing has stopped working". Mac OS

    Kind regards

    Sheena

  • How can getting error Code U44M1P7 during the upgrade, I fix?

    How can getting error Code U44M1P7 during the upgrade, I fix?

    Update product that you are trying to install?

    Is it compared to the creative or perpetual clouds?

    Please check following if you have creative clouds.

    http://helpx.Adobe.com/Creative-Suite/KB/error-u44m1p7-installing-updates-CCM.html

  • How can get answers to the question of security of the apple account

    How can I get answers to my account security question?

    See the following link for instructions: If you forgot your Apple ID - Apple Support security questions answered

  • upgrade from windows 7 starter edition to professional b and I want to go back to the starter, how can get on this subject and also the number of activation and the production of my Starter how do I get it?

    I updated level of windows 7 starter edition to professional but I want to go back to the starter. How do I go about it. I also want to know how can I get my product number and the activation number.

    New computers coming often pre-installed with Windows 7 have what is called a recovery partition. This is used to reinstall an operating system in the case of a system failure. To access it, you need to start when you start your computer by pressing a function key. This can be either F1, F2, F9, F10, F11, F12 key DEL or tab. See the manual that came with your PC for instructions on how to reinstall Windows.

    This is how the recovery partition is available for the most popular brands

    For Dell, press CTRL + F11 directly after switching on the device

    For HP, press F11 directly after switching on the device

    For Toshiba, press and hold "0" BEFORE and during the power upward

    For Acer, press and hold ALT + F10, as soon as you see the logo

    For Samsung: Press the F4 key to the Samsung logo when you turn first.

    For Asus, press F9, as soon as you see the Asus logo.

    Advent, restart your computer. Then, press F10 repeatedly until the message "Starting system recovery"

  • MultiTaskFlow liaison: Hi I have a main application and several sub these i added to my resources and using their taskFlows applications in my main application by creating the multitaskFlow binding. My problem is that how can get us currently rendered you

    Hi, I have a main application and many applications these i have added to my resource and using their taskFlows in my main application by creating the multitaskFlow binding. My problem is that how can currently get us renderings taskFlow Id link MultiTaskFlow running through an action created in our main application. Please explain if we can.

    Hello

    Try to remove the af: group in the facet of the toolbar or use this code in your bean.

    UIComponent panelBox is ae.getComponent () .getParent () .getParent ();.

    Kind regards

    Ruben.

  • How can get Oracle ADF params by previous taskflow programming

    Hello world.

    How can he get params by taskflow program previous

    My scenario: have two stubborn taskflows A and B

    in some classes of java has, I have re - direct to B like

    String thebishop = "B-flow index";

    String tfDoc = "/WEB-INF/B-flow-index.xml";

    Map < String, Object > params = new HashMap < String, Object > ();

    params.put ("name", "first stream");

    TaskFlowId taskFlowId = new TaskFlowId (tfDoc, thebishop);

    String url = ControllerContext.getInstance () .getTaskFlowURL (taskFlowId, false, params);

    FacesContext fctx = FacesContext.getCurrentInstance ();

    ExternalContext ectx = fctx.getExternalContext ();

    try {}

    ectx. Redirect (URL);

    } catch (IOException e) {}

    }

    and in the job stream B how do I value of params "name"(for programming in the java class)

    Thank you very much for suport

    Hello

    You can create the same name parameter in taskflow B and pass it to A taskflow. This is the cleanest option in my opinion.

    Concerning

  • I'm trying to update my phone.  The only list update is iOS 9.2.1.  When I try to update, it tells me that I can't because I am not connected to the internet.  How can get the update on my phone.

    I'm trying to update my phone.  The only available update is iOS 9.2.1.  When I try to upgrade, it tells me that I can't upgrade because I am is no longer connected to the internet.  How can I upgrade my phone?

    Connect to the internet.

  • How can get rid you of the bookmarks I don't want everything at once without having to delete one by one. Step by step please.

    How can delete multiple bookmarks that I don't want everything at once without having to delete one by one in the menu dropdown. Step by step please.

    Click the Favorites button in your menu and then "show all bookmarks" (or Ctrl + Shift + O). On the left side, you can click on toolbar or Bookmarks menu or Unsorted Bookmarks bookmarks (depending on where you have saved the). Now you can mark multiple bookmarks by pressing the Ctrl or the SHIFT key and clicking on it and pressing then on delete.

  • When I pluged my camcorder (Sony trv608) in my emachine (I have windows Vista Home Basic) nothing happened.how can get video off camera and on the computer?

    (In the AutoPlay dialog box that appears when you turn on the DV camera, click importing video.)
    It's # 2 on how to import the video but when I pluged my camcorder (Sony trv608) in my emachine (I have windows Vista Home Basic), nothing is happening... How to get my video on my computer and my video cam?... I also got told by sony I needed to cap analog, so I have I need to download something on internet even thought I have Director on my windows? IM so confused?

    Hi harleykristi,

    Welcome to the Microsoft answers site!

    Looks like the video camera (Sony trv608) is not compatible with windows vista, see the Sony link below:

    http://eSupport.Sony.com/us/Perl/SWU-download.pl?upd_id=1452&MDL=CCDTRV608

    () Vista drivers are not available)

    You try to install the software that came with the device in windows XP service pack 2 compatibility mode. See the link below:

    Run the program compatibility Wizard

    1. open the program compatibility Wizard the by clicking the Start button, clicking Control Panel, click programs, and then clicking on use an older program with this version of Windows.

    2. follow the directions in the wizard.

    http://Windows.Microsoft.com/en-us/Windows-Vista/make-older-programs-run-in-this-version-of-Windows

    For more information, see the link below:

    http://eSupport.Sony.com/us/Perl/model-home.pl?MDL=CCDTRV608&loc=3

    You the best solution would be to check with Sony to learn more.

    http://eSupport.Sony.com/us/Perl/contact-land.pl?MDL=CCDTRV608

    Hope this information is helpful

    Thank you, and in what concerns:

    Ajay K

    Microsoft Answers Support Engineer

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How can get the bar menu as file, save etc.

    I m mozzila firefox 39.02.0 to gradution and study at the office. So, I want to get the home menu screen.
    Menu bar at the top, then more easy 4 me.

    Thank you

    ............
    Bulbul

    Do you mean on your Android device? Firefox for Android uses a menu drop down, or if the device has a menu button next to the home button, it uses this "hardware" button I don't think that it is possible to add a menu bar of Firefox for Android.

    If you meant on Windows:

    You can use one of the following methods to display the toolbar list and activate the menu bar it:

    To activate the menu bar, toolbar bookmarks or other bars, click it in the list.

    Who help me?

    If your Firefox does not display the toolbars, or don't shows them that when you drag the mouse to the top of the screen, try the key F11 to exit full screen mode. (The F11 key also puts you in the view full screen to the normal display mode.)

  • How can I create a 'exit' pop up in Flex Mobile?

    OK, I create an application that has a button 'Quit' in all views and when we click on this button the only thing that I do is to use "navigator.popToFirstView ()", it works perfectly, but I don't want people to leave immediately, I want to have a pop up that asks if you are sure you want to leave , here is the code I have for skinnable pop up containing:

    < fx:Script >

    <! [CDATA]

    Import mx.events.FlexEvent;

    protected function yesExit(event:MouseEvent):void

    {

    This.Close ();

    }

    []] >

    < / fx:Script >

    < s:VGroup >

    < s:Label text = "Are you sure you want to exit?" width = "100%" / >

    < s:HGroup width = "100%" horizontalAlign = "center" >

    < s:Button label = "Yes" click = "yesExit (event)" width = "40%" / > "

    < s:Button label = "" click = "this.close ()" width = "40%" / > "

    < / s:HGroup >

    < / s:VGroup >

    I tried to use something like "parent.poptofirstview" but that didn't work and now I'm stuck. Any help would be appreciated. Thank you!

    You can add as an event listener for PopUpEvent.CLOSE on some view creates the pop up.  Then in this listener Manager, you can do a navigator.popToFirstView (), you will need to also pass a data type that the event ended so that you will know if the window was closed because the 'yes' has been selected or by «»

  • How can I align perfectly 3 parallelograms?

    Hey guys, so here's my dilemma. I have 3 parallelograms:

    Screen Shot 2013-12-29 at 4.42.16 PM.png

    How do I take them so that they are essentially a big parellogram with spaces between them? A bit like this:

    Screen Shot 2013-12-29 at 4.44.18 PM.png

    Like this, except perfectly?

    I tried using the alignment tools and of making things as guides, but I was rerouted during the last 40 minutes...

    Could someone help me?

    Several ways:

    Option 1

    1 duplicate and fit the upper part of one of the forms

    2. resize it in place and convert it into a guide

    3. use "magnetize the guides' to move others into place

    Option 2

    1. make 1 parallelogram and divide it by using vertical lines, using "Pathfinder > divide."

    Option 3

    1. change the Angle of "coercion" in preferences, at the corner of the upper line of the parallelogram.

    2. shift-make drag and duplicate (Cmd - D)

Maybe you are looking for