Lab Sheet 07 - Functions
Lab Sheet 07 - Functions
Department of Computing
Batch 02
****
****
****
****
2. Create four functions called Sum (), Sub (), Prod (), Dev () and Rem () to get
the summation, difference, product, division, and reminder of two numbers
which are input by the user. Allow users to enter the operation.
3. Write two separate functions for get values to an integer array and print
them.
4. Write functions called Total (), Average () and Grade () which will calculate
the total and average of marks and output the grading as follows by based on
the calculated average.
If the average is more than 80 the student is graded as “A”. If the average is
more than 70 the student is graded as “B”. And for more than 50 students it is
graded as “C”. For any other average he is graded as “F”.
5. Write two different functions to sort the following array in ascending order
and descending order.
3245649781