{"id":24804,"date":"2022-01-14T13:21:10","date_gmt":"2022-01-14T13:21:10","guid":{"rendered":"https:\/\/assignmenttutors.net\/blog\/program-writing-computer-science-homework-help\/"},"modified":"2022-01-14T13:21:10","modified_gmt":"2022-01-14T13:21:10","slug":"program-writing-computer-science-homework-help","status":"publish","type":"post","link":"https:\/\/assignmenttutors.net\/blog\/program-writing-computer-science-homework-help\/","title":{"rendered":"Program writing | Computer Science homework help"},"content":{"rendered":"<div>\n<p>\u00a0<\/p>\n<p>Driving is expensive. Write a program with a car&#8217;s miles\/gallon and gas dollars\/gallon (both floats) as input, and output the gas cost for 10 miles, 50 miles, and 400 miles.<\/p>\n<p>Ex: If the input is 20.0 3.1599, the output is:<\/p>\n<pre><code>1.57995 7.89975 63.198<\/code><\/pre>\n<p>Note: Small expression differences can yield small floating-point output differences due to computer rounding. Ex: (a + b)\/3.0 is the same as a\/3.0 + b\/3.0 but output may differ slightly. Because our system tests programs by comparing output, please obey the following when writing your expression for this problem. First use the dollars\/gallon and miles\/gallon values to calculate the dollars\/mile. Then use the dollars\/mile value to determine the cost per 10, 50, and 400 miles.<\/p>\n<p>Note: Real per-mile cost would also include maintenance and depreciation.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 Driving is expensive. Write a program with a car&#8217;s miles\/gallon and gas dollars\/gallon (both floats) as input, and output the gas cost for 10 miles, 50 miles, and 400 miles. Ex: If the input is 20.0 3.1599, the output is: 1.57995 7.89975 63.198 Note: Small expression differences can yield small floating-point output differences due [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-24804","post","type-post","status-publish","format-standard","hentry","category-education"],"_links":{"self":[{"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/posts\/24804","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/comments?post=24804"}],"version-history":[{"count":0,"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/posts\/24804\/revisions"}],"wp:attachment":[{"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/media?parent=24804"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/categories?post=24804"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/tags?post=24804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}