Hi there,
These seem like homework questions. Please note that per the forum rules we do not solve homework for you, but rather try to help you to solve it on your own. So, let's break down the relevant parts of the assignment:
Question 1:
Design a program that asks the user to enter the number of pages to be faxed |
You will need to ask the user for input, and store that input into a variable (page_num):
http://www.cplusplus.com/doc/tutorial/basic_io/
The program then uses the number of pages to be faxed to calculate the amount due. [...] Service charges $3.00; $0.20 per page for the first 10 pages; and $0.10 for each additional page. If the number of pages to be faxed is more than 100, the discounted rates are: Service charges $1.00; $0.15 per page for the first 10 pages; and $0.05 for each additional page |
This is simple if/else stuff, I could rephrase the question as such:
If page_num is higher than 100, total cost increases by 1$ service cost.
Additionally, if the number of pages is more than ten, increase total cost by 10*0.15+0.05*(page_num-10),
else (if the number of pages is lower than 10, increase total cost by page_num*0.15.
Else, if page_num is smaller than 100, total cost increases by 3$ service cost.
Additionally, if the number of pages is more than ten, increase total cost by 10*0.20+0.10*(page_num-10),
else (if the number of pages is lower than 10, increase total cost by page_num*0.20.
Question 2
Write a program that prompts the user to enter the lengths of three sides of a triangle |
You should be able to do so with the link provided above for q1.
and then outputs a message indicating whether the triangle is a right triangle. [...] In a right triangle, the square of the length of one side is equal to the sum of the squares of the lengths of the other two sides. |
Use the data received from the user for this calculation and print to the screen whether it is a right triangle or not.
Please make a fair attempt at starting on this yourself and feel free to come back to us with some of your code if you encounter any issues.
All the best,
NwN