Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#Don't use Cout or Cin Don't use #include Use #Include Algorithm: Prompt and read each value. Be sure you are storing the user's input in

#Don't use Cout or Cin

Don't use #include

Use #Include

image text in transcribedimage text in transcribedimage text in transcribed
Algorithm: Prompt and read each value. Be sure you are storing the user's input in the output parameter. Return value: None Requirements for the computecharges Function Purpose: This function computes the charge for the transaction. It uses one input parameter (GB value as an integer) and a return value (amount of the charge, which may include decimals). Input 1. GB value (as an integer) Parameter: Algorithm: Use a selection structure to determine the charge per GB, using the above rate schedule. Calculate the charge using multiplication. Return value: Transaction charge (may include decimals) Requirements for the printAccountlnfo Function Purpose: This function displays the information for the transaction to the screen. Input 1. account number Parameters: 2. GB value 3. Transaction charge Algorithm: Print, using appropriate spacing and formatting. The transaction charge must display with two decimal places. All numbers must be right-aligned. Return value: None Requirements for main: 1. Variable declarations in main should only include the variables needed within main. Do not declare all the variables needed in the program here only the ones needed within main. 2. Call the appropriate functions with the appropriate arguments and return values, if necessary. 3. All prompts must display without a newline. 4. All numbers in the output must be rightaligned. Sample Run 1 Enter account number: 12345 Enter GB used: 80 Transaction Information: Account number: 12345 GB Used: 80 Charges : 14 . 40 Sample Run 2 Enter account number: 56789 Enter GB used: 170 Transaction Information: Account number: 56789 GB Used: 170 Charges : 28 .90COMPLETE AND ACCURATE Your program must compile, execute, and give accurate output. FOLLOW ALL REQUIREMENTS ACCORDING TO THE INSTRUCTIONS Follow the instructions as written for completing this project, even if you [think you] know a "better\" way to do something. COMMENTS Include comments in your code. There must be a comment at the top of your program that includes your name, the program number, and a description ofthe program. There must be comments at each important step in your program that describes that step. Every variable must include a comment describing its purpose. BEST PRACTICES - Follow best practices in C programming as discussed in class and in the textbook, including, but not limited to, appropriate use of white space, indenting, alignment, meaningful identifier names, etc. Points will be deducted for sloppy code that is hard to read, even if it works, so pay attention to these details

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions