University | Singapore University of Social Science (SUSS) |
Subject | ICT133: Structured Programming |
Question 1.
You are to write a C program that accepts three integer values from the user representing the three sides of a triangle. Your program should report to the user if it is a valid triangle and what sort of a triangle: equilateral, scalene or isosceles. (Hint: a triangle is only valid if the sum of any given pair of sides is greater than the remaining side.)
Your solution does not need to be modular and so a high-level algorithm is not required, although you are welcome to include one if you wish.
Buy Custom Answer of This Assessment & Raise Your Grades
Question 2.
You should read this question as if the change giver is a bank teller who has to give amounts of money to customers but can’t count
You are asked to write a simple C program that will accept an integer value in the range of 5-95 and as a multiple of 5 representing the number of cents to give to a customer in their change.
The program should calculate how many coins are of each denomination and display this to the user. Valid coin values are 50, 20, 10 and 5. Your solution (program and algorithm) should be modular in nature. This requires the submission of a high-level algorithm and suitable decompositions of each step.
Note that for this problem the principle of code reuse is particularly important and a significant number of marks are allocated to this.
You should attempt to design your solution such that it consists of a relatively small number of functions that are as general in design as possible and you should have one function in particular that can be reused (called repeatedly) in order to solve the majority of the problem.
If you find that you have developed a large number of functions that each performs a similar task (or have a lot of repeated code) then attempt to analyse your design to generalise the logic so that it may be reused.
Question 3
You are to extend your solution to Question 2 above by allowing the user to enter the amount of change as dollars and cents as a double (real number). Valid dollar values are 100, 50, 20, 10, 5, 2 and 1.
Your program should output the correct combination of dollar and cent denominations required and should be able to work for any valid dollar amounts. Cents amounts maybe should be multiples of 5 as in the previous question.
In this question, you will need to explicitly convert a double to an integer to break the inputted double down to its component parts as integers. You can use the following code as the basis for doing this:
float change; int dollar, cents;
dollar = (int) change;
cents = (int) (((change — dollar)*100) + 0.5);
Buy Custom Answer of This Assessment & Raise Your Grades
Are you thinking of someone who solve my assignment on ICT133: Structured Programming Assignment? then you are at the right place. Singapore Assignment Help has a dedicated team of well-qualified suss assignment experts who always understand your assignment need. Our assignment experts ensure you the provided solution always help you to score higher rank in your academic area.
Looking for Plagiarism free Answers for your college/ university Assignments.
- ECE210 Advocacy and Collaborations with Families Assignment: Supporting Young Children Through Grief and Family-Centered Partnerships
- ACC707 Accounting and Finance Assignment: Evaluating Investment Decisions, Budgeting Strategies, and Financial Performance Analysis
- NCO201 Learn to Learn, Learn for Life TMA-01: Developing Self-Directed Learning Through the Journey of Mastering Public Speaking
- PSS219 Public Safety and Security in Singapore Group-Based Assignment: Strengthening National Resilience Through Policy Responses from the 2025 Committee of Supply Debate
- MTH240 Engineering Mathematics I Assignment: Heat Transfer, Chemical Balancing, Circuit Analysis, Signal Processing, and Matrix Theory
- Engaging Youth with IBM Skills Build Assignment: Designing Innovative Strategies for Skill Development and Career Growth
- BUS368 Innovation Management and Digital Transformation Assignment: Managing Innovation in Foldable, Trifold, and Stretchable Display Technologies
- BUS366 Assignment: Process Improvement and Recruitment Optimization Using Lean Six Sigma Methodology
- HBC203 Statistics and Data Analysis for the Social and Behavioural Sciences TMA-01: A Comparative Analysis of Workplace Wellbeing Interventions and Their Impact on Employee Productivity
- BCAF003 Business Accounting Assignment: A Comprehensive Study on Bank Reconciliation, Cash Controls, Inventory Valuation, and Financial Analysis