Ask Question
31 August, 03:36

Write code to read a list of song names and durations from input. Input first receives a song name, then the duration of that song. Input example: Time 424 Money 383 quit.

+1
Answers (1)
  1. 31 August, 04:06
    0
    public class SongList

    {

    public static void main (String [] args)

    {

    scanner input = new Scanner (System. in)

    System. out. Println ("Do you want to run again:/n (1 for yes and 2 for no ")

    Int run = in. nextInt

    Do

    {

    System. out. Println ("Enter song name:/n ")

    String songName = in. nextString;

    System. out. Println ("Enter song duration:/n ")

    String songDuration = in. nextString;

    }

    while (run = = 1)

    }

    }
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Write code to read a list of song names and durations from input. Input first receives a song name, then the duration of that song. Input ...” in 📘 Engineering if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers