08-10-2016 02:45 AM
I got one task to calculate the chocolate counting.
the task is;
A user is having some amount (A), Rupee for per chocolate (B), chocolate For Covers (C).
for an example, if a user having some amount like Rs.10 in his hand and he wants to buy a chocolate and per chocolate amount would be Rs.1 means he can get 10 chocolates. If he returned 3 choc.covers means he can get 1 choc instead of covers. likewise we have to calculate how many choc a user can get??
I had done by using simple method which i knew already. now i'm trying with using loops to simplify the program with accurate results. It's little bit confusing me to do like this. Can anyone help me to solve this using loops or other than simpler that i had done already??
Solved! Go to Solution.
08-10-2016 03:18 AM
Did you go through State machine example? http://www.ni.com/white-paper/3024/en/
08-10-2016 05:42 AM
Thank You.. I just modified my first edition and from that i'm getting output which i was expected.. and here it is....