Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Fungsi (ii)


Published on

  • Be the first to comment

  • Be the first to like this

Fungsi (ii)

  1. 1. FUNCTION BY VALUE A stationary Company sells four types of items and each item price is shown in following table:- Item Code Price per Quantity 1031 RM 1.23 3031 RM 2.34 2111 RM 6.78 3455 RM 8.75 a. Write a function definition to calculate the price for an item and display the result. This function will receive two parameters which are item code and quantity for the item. The function prototype for this function is declared as follows:- void Price ( int, int); b. If this function Price is declared as follows float Price ( ); write the function definition whereby the data of an item code and quantity will be input this function, then this function will calculate the price and return the result to the main.