Question: PLEASE WRITE THIS CODE IN C LANGUAGE The objective for this assignment is to create a program that: 1) Asks the user to provide as
PLEASE WRITE THIS CODE IN C LANGUAGE The objective for this assignment is to create a program that: 1) Asks the user to provide as input from the command line an artist name. At most 4 artists can be provided as input. For each artist, at least 1 and at most 3 songs could be provided. To indicate you do not want to add more artists or more songs, you can press Enter or a character of your choice. For example, this is how the console should ask the users to provide the singers/groups names and their songs as input. Note that command line output is indicated in black while the command line input is indicated in blue. Insert an artist/group name: Taylor Swift Insert song 1 for Taylor Swift Shake it Off Insert song 2 for Taylor Swift Bad Blood Insert song 3 for Taylor Swift Anti-Hero Insert an artist/group name: The Cranberries Insert song 1 for The Cranberries Zombie Insert song 2 for The Cranberries Salvation Insert song 3 for The Cranberries In the End Insert an artist/group name: U2 Insert song 1 for U2 With or Without you Insert song 2 for U2 One Insert song 3 for U2 Beautiful Day Insert an artist/group name: Lorde Insert song 1 for Lorde Green Light Insert song 2 for Lorde The Louvre Insert song 3 for Lorde
Tennis Court 2) Then the program should bubblesort and print the list of songs given as input depending on the artist/group name and the song title both alphabetical order. For example, this should be the output for the list of artists/group names and songs provided at step 2. Sorted list of songs: Lorde - Green Light - Tennis Court - The Louvre Taylor Swift - Anti-Hero - Bad Blood - Shake it Off The Cranberries - In the End - Salvation - Zombie U2 - Beautiful Day - One - With or Without you 3) Create a random playlist of the songs given as input ensuring that the same song can only appear again after at list 5 different other songs have played. The same song must appear twice. For example, this is a possible output for the list of artists/group names and songs provided at step 2. Shuffled Playlist: Lorde - Green Light The Cranberries - Zombie The Cranberries - In the End Taylor Swift - Bad Blood Taylor Swift - Shake it Off U2 - One Lorde - Green Light U2 - With or Without you The Cranberries - Salvation Taylor Swift - Anti-Hero U2 - Beautiful Day Taylor Swift - Bad Blood The Cranberries - In the End Taylor Swift - Shake it Off U2 - One Lorde Tennis Court The Cranberries Salvation Lorde - The Louvre The Cranberries - Zombie Taylor Swift - Anti-Hero U2 - Beautiful Day Lorde Tennis Court U2 - With or Without you Lorde - The Louvre
Using the Fischer YatesAlgoritm for shuffling
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
