two c assignments and easy works by using codeblcoks

Ace your studies with our custom writing services! We've got your back for top grades and timely submissions, so you can say goodbye to the stress. Trust us to get you there!


Order a Similar Paper Order a Different Paper

Problem H1

Write two functions:
A function named sum which takes two integer values as arguments, and returns their sum.
A main function which asks the user for two integer values, passes the two values to the sum function, then prints the two values and their sum.
The main function then again asks the user for two integer values, passes the two values to the sum function, then prints the two values and their sum.

Test it once, with the values 3 and 4, and then 5 and 49.

Problem H2

The purpose of this problem is to write some small functions and practice passing things around amoung functions.
1) The main function shall ask the user to enter three numbers and read the three numbers.
2) Write a function named findSum that takes three numbers as arguments and returns their sum. The main function shall call this function.
3) Write a function named findAverage that takes the sum and the number of numbers and returns the average. The main function shall call this function.
4) Write a function named findSmallest that takes the three numbers and returns the smallest value. The main function shall call this function.
5) The main function shall print the results in the following format, with two decimal positions and the decimal points aligned:

Results:_x000D_
First  number   17.23_x000D_
Second number    3.98_x000D_
Third  number   22.32_x000D_
Total           43.53_x000D_
Average         14.51_x000D_
Smallest         3.98_x000D_
  

Test the program twice with the following two sets of numbers:

37.144  2.4144  19_x000D_
 4.23   5.78     6.21_x000D_
  

Writerbay.net

Looking for top-notch essay writing services? We've got you covered! Connect with our writing experts today. Placing your order is easy, taking less than 5 minutes. Click below to get started.


Order a Similar Paper Order a Different Paper