Question: Question 1: (3 marks) Briefly explain the difference between memory and storage. Mention at least 2 differences. Question 2: (4 marks) Briefly explain what is
Question 1: (3 marks) Briefly explain the difference between memory and storage. Mention at least 2 differences. Question 2: (4 marks) Briefly explain what is wrong with the following code #include Temp in F = 9 5 Temp in C + 32 Temp in K = Temp in C + 273.15 Example: Input Give me a temperature in Celsius: 30 Output 30 degrees celsius is equivalent to 86 degrees fahrenheit or 303.15 kelvin Problem 2: (5 marks) Imagine you are running a store, and you have access to cash in different denominations, 20, 10, 5 and 1 for the dollars; quarters (25 cents), dimes (10 cents), nickels (5 cents) and pennies (1 cent) for the rest. Write a code that receives an amount of money as input and says how to build that number using your cash and using the least amount of bills/coins as possible. (Hint: Integer division and modulus are very useful here) Example Input: Tell me how much money: 73.17 Output Twenties= 3 Tens= 1 Fives= 0 Dollars= 3 Quarters= 0 Dimes= 1 Nickels= 1 Pennies= 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
