Algorithm for question 4:
step1: start
step2:declare 2D character array to store names of books
step3:read books names as input from the user/student
step4:sort the array of books names using selection sort
step5:make a nested for loop where upper loop extracts each and compares this names by rest of the names
step6:after executing both the loops.finally sorted array will be obtained.
step7:display the sorted books
step8:stop
SOURCE CODE IN C lN LANGUAGE:
#include <stdio.h>
#include <string.h>
void main()
{
char name[10][8], tname[10][8], temp[8];
int i, j, n;
printf("Enter the value of n \n");
scanf("%d", &n);
printf("Enter %d names n \n", n);
for (i = 0; i < n; i++)
{
scanf("%s", name[i]);
strcpy(tname[i], name[i]);
}
for (i = 0; i < n - 1 ; i++)
{
for (j = i + 1; j < n; j++)
{
if (strcmp(name[i], name[j]) > 0)
{
strcpy(temp, name[i]);
strcpy(name[i], name[j]);
strcpy(name[j], temp);
}
}
}
printf("\n----------------------------------------\n");
printf("Input NamestSorted names\n");
printf("------------------------------------------\n");
for (i = 0; i < n; i++)
{
printf("%s\t\t%s\n", tname[i], name[i]);
}
printf("------------------------------------------\n");
}
for the flow chart just click on following link(note :download image from the following link there u would found flow chart)
https://github.com/shaikshahina/demo1
NU library is planning to develop an automated system to calculate the fines of the late returned books. Develop a system to help the university to complete the task based on the given details: N...