For This or a Similar Paper Click To Order Now

Driving 6 – 20 mph over the speed limit receives a $75 ticket.
Learning Goal: I'm working on a c# question and need an explanation and answer to help me learn. Lab2-Speeding ticket Write a program that is given two integers representing a speed limit and driving speed in miles per hour (mph) and outputs thetraffic ticket amount. Driving 10 mph under the speed limit (or slower) receives a $50 ticket. Driving 6 - 20 mph over the speed limit receives a $75 ticket. Driving 21 - 40 mph over the speed limit receives a $150 ticket. Driving faster than 40 mph over the speed limit receives a $300 ticket. Otherwise, no ticket is received. Ex: If the input is: 35 45 the output is: 75 Ex: If the input is: 35 26 the output is: 0Lab3-Remove the gray part Summary: Given integer values for red, green, and blue, subtract the gray from each value. Computers represent color by combining the sub-colors red, green, and blue (rgb). Each sub-color's value can range from 0 to 255. Thus (255, 0, 0) is bright red, (130, 0, 130) is a medium purple, (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (In other words, equal amounts of red, green, blue yield gray). Given values for red, green, and blue, remove the gray part. Ex: If the input is: 130 50 130 the output is: 80 0 80 Find the smallest value, and then subtract it from all three values, thus removing the gray. Assignment 4 Part 1 (30points) Evaluate the Relational and Logical expressions in 09 Logical Operators.ppt Download 09 Logical Operators.ppt(9.8 Practice part page from the slides ) Put these expressions in a small program that will demonstrate whether they are true or false. Paste the code, and output from the program into your submission. Use if statements and output a message indicating that the expression is True or False. Part 2(70 points)Write a C program (with meaningful comments) to solve a problem described in English. We want to count how many passing grades are entered. We don’t know how many grades there will be. Use a sentinel controlled while loop that will ask the user to enter student grades until a value of -1 is entered. Use a counter variable to count all the grades that are passing grades, where 70 is the minimum passing grade. If there are any grades that are out of the range 0 – 100, present an error message to the user, and do not count that grade as passing. We also would like to see what percentage of the valid grades are passing. Create two more test cases. Use following one in addition to the two you create. Grades Entered: Expected Results 45 90 70 87 123 “That is not a valid grade!” 100 -1 You entered 4 passing grades. 80.0% of the valid grades entered are passing grades. Deliverables: Paste code, program output and screen shots into one Word document. Presenting your solution is part of the assignment. Solution to Part 1(paste code and screen shot/s of the output window) – the relational/logical expressions. (20 points) The code that solves the passing grades problem. Remember to use meaningful comments. (70 points) Output from running the program 3 different times. Use two test cases that you created and the one I have given you. (10 points (please each assignment has to be in a different file doc with screenshots of work also has to be in the same file.)

For This or a Similar Paper Click To Order Now

Leave a Reply

Your email address will not be published. Required fields are marked *

For This or a Similar Paper Click To Order Now