[Solved] SOLVED: COP 3223 Introduction to C Summer Assignment 2

$25

File Name: SOLVED:_COP_3223_Introduction_to_C_Summer_Assignment_2.zip
File Size: 508.68 KB

SKU: [Solved] SOLVED: COP 3223 Introduction to C Summer Assignment 2 Category: Tag:
5/5 - (1 vote)

This assignment is worth 60 points Objectives: The purpose of this assignment, is for students to demonstrate knowledge of How to evaluate arithmetic expressions in C Arithmetic operators in C the basic template of a simple C program the syntax of the printf and scanf functions use of variables- particularly declaration and assignment use of simple C syntax and semantics to create a program that compiles and runs correctly Problem: Change Machine: You have just been hired by the Green Leaf Software Company (GLSC) which produces both hardware and software for the change machines used in most supermarkets. Customers insert all of their small change, pennies and dimes into the machine and they receive the equivalent value in the largest possible denominations: single dollars, quarters, dimes, nickels and pennies. For example, if a customer inserts 30 pennies, the machine will return 1 quarter and 1 nickel. Your task is to program the change machine for dealing with pennies. When your program is run, the user is prompted to enter the number of pennies that they want changed (that is the number of pennies entered into the machine. Your program should then output the money returned by the machine in single dollars, quarters, dimes, nickels and pennies. Sample run1 Please enter the number of pennies that you have 125 Your change is: dollar bills: 1 quarters: 1 dimes: 0 nickels: 0 pennies: 0 Thank you Sample run2 Please enter the number of pennies that you have 215 Your change is: dollar bills: 2 quarters: 0 dimes: 1 nickels: 1 pennies: 0 Thank you Submission of Assignment Please submit your code via Webcourses by the deadline. No assignments will be accepted via email. Your submission should be a single file called changemachine.c. Programs will be graded using DevC++; so be sure that your code runs correctly in this IDE, before submission. If you do not have DevC++ on your personal machine, you may use a computer in any campus lab to test your code. Above are 2 samples of what is expected when your code is run. The blue text represents the user input. The black text is what your program should output when run. Restrictions 1. You may assume that the user always enters a valid number of pennies that is a positive whole number 2. The input used to test your code is not limited to the two examples provided in this document.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] SOLVED: COP 3223 Introduction to C Summer Assignment 2
$25