Answer to Question #327967 in C# for kun

Question #327967

Write a program that prompts the user for the following values: nickname and favourite movie/series. Write a user defined method named displayDetails() that accepts two string values as input, and then displays these values. Add the required instructions to your Main() program to allow it to display the text Hello World and then calls the displayDetails() method to display your information. 


1
Expert's answer
2022-04-12T16:15:11-0400
internal class Program
{ 
    static void Main()
    {
        Console.WriteLine("Hello world");


        Console.Write("Enter nickname: ");
        string nickname = Console.ReadLine();


        Console.Write("Enter favourite movie/series: ");
        string favouriteMovie = Console.ReadLine();


        displayDetails(nickname, favouriteMovie);


        Console.ReadKey();
    }
    static void displayDetails(string nickname, string favouriteMovie)
    {
        Console.WriteLine($"Your nickname {nickname}, and favorite series/movie: {favouriteMovie}");
    }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS