Answer to Question #328987 in C# for Siyanda

Question #328987

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-15T04:43:49-0400
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ComputeAverageApp
{
    class ComputeAverageProgram
    {
        static void Main(string[] args)
        {

            Console.WriteLine("Hello World");
 
            Console.Write("Enter your nickname: ");
            string nickname = Console.ReadLine();

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

            displayDetails(nickname, favMovie);

            Console.ReadLine();
        }

        private static void displayDetails(string nickName, string favMovie)
        {
            Console.WriteLine("Your nickname: {0}", nickName);
            Console.WriteLine("Your favourite movie/series: {0}", favMovie);
        }
    }

   
}

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