3/27/2010

Assignment 3 BCT1113 Computer Programming

Assignment 3

1. Write a function named CalSAP ( short for Calculate Sum, average and Product) that have three arguments, prints the sum, the average and product. The function calling should be as follows

kira(13,27,14);

and the following output should be displayed by function CalSAP.

Sum is 54
Average is 18
Product is 4914




2. Write a function named mutlak that computes and return the absolute difference of its two arguments, where the absolute difference of A and B is A – B if A is greater than B and B –A if B is greater than A. The function calling should be as follows

*(error)

3. Write a program to read 20 data items into two arrays, x and y, of size 10. Store the product of the corresponding elements of x and y in a third array z, also of size 10. Print a three column table displaying the array x,y and z. Then compute and print the sum of the item in Z.


*arahan C++ tidak dapat di paparkan di sini.

No comments:

Cara download Installer windows 10 dalam format ISO

1. Jika anda bercadang untuk download windows 10 melalui website rasmi windows - pilihan untuk download dalam format ISO tidak di berikan.  ...