联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> C/C++编程C/C++编程

日期:2018-11-02 10:42

420-P16-AS - STRUCTURAL PROGRAMMAMING

Mihai Maftei

Lab 7.1 - Exercises on functions and arrays – Code in C++

Exercise

Write a function subTotal() declaration (prototype) and a function definition for a function that

takes one argument of type int and one argument of type double, and that returns a value of

type double that is the multiplication of the two arguments.

Write a function printTotal() declaration (prototype) and a function definition for a function

that takes one argument of type double, and allow you to print out the value passed as value,

and that returns the void data type.

Write a program in C++ where you have to integrate those 2 functions definitions and called

inside in main() function.

Your application should have also a menu to be presented to the user and allow to simulate

buying up to 5 of some products that have their prices between 10.50$ to 249.90$.

The program should display the sub-total (qty * price), and also the final price of the transaction

with the sales taxes (stotal + stotal * 0.05 + stotal * 0.09975).

Save all the results into an array and then print out the sum of all 5 entries using the for loop.

Identify yourself and send the solution as a compressed file on LEA of Omnivox.

Thank you.


版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp