Use C language only. Create a program that will ask for Enter number of students: (for this example 2) Enter student 1's name: Enter student 1's age: Enter student 2's name: E nter student 2's age: At the end, the program shall display two class lists: one with arranged name (ascending order) and the other one arranged according to their age (ascending order). The two lists should contain the complete details of the students as follows: Sorted by name:
Use C language only.
Create a program that will ask for
Enter number of students: (for this example 2)
Enter student 1's name:
Enter student 1's age:
Enter student 2's name: E
nter student 2's age:
At the end, the program shall display two class lists: one with arranged name (ascending order) and the other one arranged according to their age (ascending order).
The two lists should contain the complete details of the students as follows: Sorted by name:
1. name, age
2. name, age
Sorted by age:
1. name, age
2. name, age
If the number of students is less than one, the program will display "no students to display."
The letter case (uppercase or lowercase) shall have no bearing in the arrangement of names. Please use the "fgets()" in getting the name.
Step by step
Solved in 2 steps