QUIZ 2#2 - FUNCTION
Write a prototype for the following functions:
Example : Computing an average of three integers.
double Tambah (int, int, int)
1. Computing an average of two integers. double average (int ,int );
2. Computing a sales commission, given the sales amount and the commission rate. double comm (double , double)
3. Computing a revised salary, given the current salary and percentage of increment. double gajibaru (double, double);
4.Printing the calendar for a month, given the month and year. void cetakbulan(int, int);
5.Computing a square root. double sqrt(double)
6.Testing whether a number is even, and returning true if it is. bool ujiNoGenap (int);
7.Testing whether a score is passed and returning trure if it is. bool ujimarkah (double);
8. Printing a message a specified number of times. void cetakmsg(string,int);
9. Computing the monthly payment, given the loan amount, number of years, and annual interest rate. double bayaran(double, int, double);
10.Finding the corresponding uppercase letter, given a lowercase letter. char hurufbesar(char);
No comments:
Post a Comment