EASy68K  
It is currently Wed Apr 26, 2017 5:40 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sat Mar 12, 2016 3:04 pm 
Offline

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.
please help :cry: :(
thank you


Attachments:
File comment: tariff rates
Capture.JPG
Capture.JPG [ 49.78 KiB | Viewed 1134 times ]
Top
 Profile  
 
PostPosted: Thu Mar 17, 2016 2:46 am 
Offline

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


Top
 Profile  
 
PostPosted: Sun Dec 11, 2016 2:43 pm 
Offline

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
 Profile  
 
PostPosted: Thu Feb 23, 2017 7:45 am 
Offline

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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 8 guests


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

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group