It is currently Fri Jan 19, 2018 1:44 am

 All times are UTC

 Page 1 of 1 [ 4 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: Calculate electricity billPosted: Sat Mar 12, 2016 3:04 pm

Joined: Sat Mar 12, 2016 2:36 pm
Posts: 1
how to create a program to calculate the electricity bill based on given domestic tariff.
i attached the picture for tariff rates
the program take the input from the user and calculate their bill based on the input given.
thank you

 Attachments: File comment: tariff rates Capture.JPG [ 49.78 KiB | Viewed 2500 times ]
Top

 Post subject: Re: Calculate electricity billPosted: Thu Mar 17, 2016 2:46 am

Joined: Wed Apr 25, 2012 12:43 pm
Posts: 7
¿Homework?

Top

 Post subject: Re: Calculate electricity billPosted: Sun Dec 11, 2016 2:43 pm

Joined: Sat Dec 10, 2016 10:57 pm
Posts: 3
Based on some shady recollection of this (i am getting back into 68k after 15 years at least away from it), i would have a lookup-table where you set your tariffs. Then just take as input which tariff the user is on, then the consumption. All you would need then is to go to that index of the table to fetch the tariff, and multiply the consumed amount by that, store it in a suitable register and trap for output.

Top

 Post subject: Re: Calculate electricity billPosted: Thu Feb 23, 2017 7:45 am

Joined: Wed Feb 22, 2017 7:10 am
Posts: 1
der_richter wrote:
Based on some shady recollection of this (i am getting back into 68k after 15 years at least away from it), i would have a lookup-table where you set your tariffs. Then just take as input which tariff the user is on, then the consumption. All you would need then is to go to that index of the table to fetch the tariff, and multiply the consumed amount by that, store it in a suitable register and trap for output.

That sounds like the best way to do it.

_________________
If you like the https://www.ybinteractive.com/sizegenet ... ew-results new Size Genetics.

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 4 posts ]

 All times are UTC

Who is online

Users browsing this forum: No registered users and 2 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ EASy68K Forum    FAQ    Latest Features    EASy68K Questions    68000 Programming Questions    Wish List    Wishes Granted    Undocumented Features    Documented Features    General Discussion    EASy68K Projects