help me to make a small program
-
Hello Everyone, I would be very happy if u guys help me to make a small program based on the following details. I just need u to help me only the part specially how to write the first condition. cheers :) If a car driver speeds no more than 20 km/h over the speed limit, the driver will avoid the income-based unit fines , and gets just the infraction fine . Make a program that tells how much the infraction fine is. It’s based on the speed limit and the excess speed. The program asks for the driving speed and the speed limit. If there is speeding the ticket will be decided upon based on the following rules: If the speed limit is 10-60 kilometers an hour, and the excess speed is no more than 15 km/h, the speeding leads into a 85-euro infraction fine . More than 15 but no more than 20 km/h leads into an infraction fine of 115 euros. If the speed limit is 70-120 kilometers an hour, a max 15 km/h speeding will be penalizes with 70-euro infraction fine. The infraction fine is 100 euros when the excess speed is more than 15 km/h, but no more than 20 km/h. (If the driver drives more than 20 km/h over the limit => he will get unit fines,.
-
Hello Everyone, I would be very happy if u guys help me to make a small program based on the following details. I just need u to help me only the part specially how to write the first condition. cheers :) If a car driver speeds no more than 20 km/h over the speed limit, the driver will avoid the income-based unit fines , and gets just the infraction fine . Make a program that tells how much the infraction fine is. It’s based on the speed limit and the excess speed. The program asks for the driving speed and the speed limit. If there is speeding the ticket will be decided upon based on the following rules: If the speed limit is 10-60 kilometers an hour, and the excess speed is no more than 15 km/h, the speeding leads into a 85-euro infraction fine . More than 15 but no more than 20 km/h leads into an infraction fine of 115 euros. If the speed limit is 70-120 kilometers an hour, a max 15 km/h speeding will be penalizes with 70-euro infraction fine. The infraction fine is 100 euros when the excess speed is more than 15 km/h, but no more than 20 km/h. (If the driver drives more than 20 km/h over the limit => he will get unit fines,.
-
Hello Everyone, I would be very happy if u guys help me to make a small program based on the following details. I just need u to help me only the part specially how to write the first condition. cheers :) If a car driver speeds no more than 20 km/h over the speed limit, the driver will avoid the income-based unit fines , and gets just the infraction fine . Make a program that tells how much the infraction fine is. It’s based on the speed limit and the excess speed. The program asks for the driving speed and the speed limit. If there is speeding the ticket will be decided upon based on the following rules: If the speed limit is 10-60 kilometers an hour, and the excess speed is no more than 15 km/h, the speeding leads into a 85-euro infraction fine . More than 15 but no more than 20 km/h leads into an infraction fine of 115 euros. If the speed limit is 70-120 kilometers an hour, a max 15 km/h speeding will be penalizes with 70-euro infraction fine. The infraction fine is 100 euros when the excess speed is more than 15 km/h, but no more than 20 km/h. (If the driver drives more than 20 km/h over the limit => he will get unit fines,.
Refer to your JS lesson notes, especially those concern JS operators and conditions, and you should be able to complete your homework. If for whatever reason, you do not have those notes, fret not. Check out some online tutorials, such as JavaScript Operators[^] and JavaScript If...Else Statements[^]
Peter Leow https://www.amazon.com/author/peterleow
-
1. This is not a Javascript question. 2. Sorry, but we do not do other people's homework.
-
Refer to your JS lesson notes, especially those concern JS operators and conditions, and you should be able to complete your homework. If for whatever reason, you do not have those notes, fret not. Check out some online tutorials, such as JavaScript Operators[^] and JavaScript If...Else Statements[^]
Peter Leow https://www.amazon.com/author/peterleow
-
I am really sorry. I have been trying to solve this for long but still can't. I know the conditions and operators but i could not come up with the right one. you mention its not javascript question? why its not a javascript question? thanks
Start by writing the rules in natural language (from your question), something like:
Display a message
Read Speed value
If speed is greater than [ speed value 1 ]
Then
check values and issue fine
ElseIf speed is greater than [ speed value 2 ]
Then
check values and issue fine
...
EndifOnce you have that logic written down you can convert it to your programming language.
-
Hello Everyone, I would be very happy if u guys help me to make a small program based on the following details. I just need u to help me only the part specially how to write the first condition. cheers :) If a car driver speeds no more than 20 km/h over the speed limit, the driver will avoid the income-based unit fines , and gets just the infraction fine . Make a program that tells how much the infraction fine is. It’s based on the speed limit and the excess speed. The program asks for the driving speed and the speed limit. If there is speeding the ticket will be decided upon based on the following rules: If the speed limit is 10-60 kilometers an hour, and the excess speed is no more than 15 km/h, the speeding leads into a 85-euro infraction fine . More than 15 but no more than 20 km/h leads into an infraction fine of 115 euros. If the speed limit is 70-120 kilometers an hour, a max 15 km/h speeding will be penalizes with 70-euro infraction fine. The infraction fine is 100 euros when the excess speed is more than 15 km/h, but no more than 20 km/h. (If the driver drives more than 20 km/h over the limit => he will get unit fines,.