Question

C #sharp Visual Studio Programming, Implement the array declaration and initialization for -For this quiz I...

C #sharp Visual Studio Programming,

Implement the array declaration and initialization for -For this quiz I attached (EXAMPLE of 10 questions)....

Using arrays to format this quiz?

using System;

namespace Quiz
{
    class MainClass
    {
        public static void Main(string[] args)
        {

            Console.WriteLine("Welcome to the Quiz!");
            Console.WriteLine("--------------------------------");
            Console.WriteLine(" ");

            //Questions
         
            var Question1 = "1. How many trees in a forest?";
            var Question2 = "2. Sample Question";
            var Question3 = "3. Sample Question";
            var Question4 = "4. Sample Question";
            var Question5 = "5. Sample Question";
            var Question6 = "6. Sample Question";
            var Question7 = "7. Sample Question";
            var Question8 = "8. Sample Question";
            var Question9 = "9. Sample Question";
            var Question10 = "10. Sample Question";

            //question options and its solution

            var Answer1a = "3";
            var Answer1b = "5";
            var Answer1c = "2";
            var Answer1d = "4";
            var Answer1Solution = "a";

            var Answer2a = " ";
            var Answer2b = " ";
            var Answer2c = " ";
            var Answer2d = " ";
            var Answer2Solution = " ";

            var Answer3a = " ";
            var Answer3b = " ";
            var Answer3c = " ";
            var Answer3d = " ";
            var Answer3Solution = " ";

            var Answer4a = " ";
            var Answer4b = " ";
            var Answer4c = " ";
            var Answer4d = " ";
            var Answer4Solution = " ";

          
            else
            {
..............etc.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

using System;

namespace Quiz
{
class MainClass
{
public static void Main(string[] args)
{

Console.WriteLine("Welcome to the Quiz!");
Console.WriteLine("--------------------------------");
Console.WriteLine(" ");

//Questions
//declaring questions array
var[] Question = new var[10];

Question[1] = "1. How many trees in a forest?";
Question[2] = "2. Sample Question";
Question[3] = "3. Sample Question";
Question[4] = "4. Sample Question";
Question[5] = "5. Sample Question";
Question[6]= "6. Sample Question";
Question[7] = "7. Sample Question";
Question[8] = "8. Sample Question";
Question[9] = "9. Sample Question";
Question[10] = "10. Sample Question";

//for option
//declaring options 2d array
var[] options= new var[10,4]{
              
               {"3","4","5","6"},//for question1
               {"3","4","5","6"},//for question2
               {"3","4","5","6"},//for question3
               {"3","4","5","6"},//for question4 //change options as per you need
               {"3","4","5","6"},//for question5
               {"3","4","5","6"},//for question6
               {"3","4","5","6"},//for question7
               {"3","4","5","6"},//for question8
               {"3","4","5","6"},//for question9
               {"3","4","5","6"},//for question10
              
               }
              
              
           //declaring answers array
           var[] AnswerSolution = new var[10]
           {
               "a",//Answer 1
               "a",//Answer 2
               "a",//Answer 3
               "a",//Answer 4
               "a",//Answer 5//change options as per ur need
               "a",//Answer 6
               "a",//Answer 7
               "a",//Answer 8
               "a",//Answer 9
               "a",//Answer 10
              
           };
          
       }
      
      
   }
}

Add a comment
Know the answer?
Add Answer to:
C #sharp Visual Studio Programming, Implement the array declaration and initialization for -For this quiz I...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • C# Sharp for Visual Studio Need Expert help -to use Video studio to write a Quiz....

    C# Sharp for Visual Studio Need Expert help -to use Video studio to write a Quiz. The quiz is multiple choice with 10 questions. I need a source code to start and I can copy and paste my questions. EX: using System; namespace Quiz     class MainClass     {         public static void Main(string[] args)         {         Console.WriteLine("Welcome to the Quiz!");             Console.WriteLine("");                 // Declare variables implicitly and explicitly             var Question 1= "How many trees in a forest?");                var Answer1a = "3"                    var Answer1b ="5"...

  • for my assignment, we have to create a basic quiz on c sharp using visual studio,...

    for my assignment, we have to create a basic quiz on c sharp using visual studio, i have my questions, gotten the score calculated if answered correct or not. but in having issues with looping back to the question until answered right.

  • So I am creating a 10 question quiz in Microsoft Visual Studio 2017 (C#) and I...

    So I am creating a 10 question quiz in Microsoft Visual Studio 2017 (C#) and I need help editing my code. I want my quiz to clear the screen after each question. It should do one question at a time and then give a retry of each question that was wrong. The right answer should appear if the retry is wrong. After the 1 retry of each question, a grade should appear. Please note and explain the changes you make...

  • Lesson Assignment There are 13 questions regarding slicing. The first 10 are required to pass. The...

    Lesson Assignment There are 13 questions regarding slicing. The first 10 are required to pass. The last 3 are extra credit. You will place all your answers in the lesson.py tab. Select that tab and take a look at how it's done. For your answers, each function (already defined) returns a tuple: the first item is the answer using index notation (e.g. text[16:20]) the second item is the answer using slice notation (e.g. slice(16,20,None)) the numbers you use for the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT