Procedure C Lab-16
Procedure C Lab-16
Step 1: Start .
Step 2: Reserve space for storing read character.
Step 3: Request & read character.
Step 4: If given character is in uppercase convert to lowercase.
Step 5: Compare the character to 'a','e','i','o' & 'u' if any match then print as vowel.
Step 6: If not matching print consonant .
Step 7: Stop .
Step 1: Start.
Step 2: Reserve space for total marks, maximum marks & percentage.
Step 3: Request & read obtained maximum marks .
Step 4: Request & read total maximum marks.
Step 5: Calculate percentage
Total obtained marks
= X100
Total maximum marks
Step1: Start.
Step2: Reserve the space for two data matrices, sum matrix, row, column values and for count
variables.
Step 3: Request and read the row and column of matrices.
Step4: Request and read the elements of first matrix. Store the values read by pointing memory
location.
Step5: Request and read the elements of second matrix. Store the values read by pointing memory
location.
Step6: Point to each element of data matrices to add the store the sum by pointing to location of sum
matrix.
Step7: Print the sum matrix.
Step8: Stop.
Algorithm to Sort a list of numbers using user defined function
Step1: Start.
Step2: Reserve the space for list, length of list and count variables.
Step3: Request and read the number of elements.
Step4: Request and read the elements of list.
Step 5: Print the unsorted list.
Step 6: Call the user defined function to sort the list, pass length of list and elements of list.
Step7: print the sorted list.
Step8: Stop
Algorithm to for sorting in user defined function