SHARE
SPREAD
HELP

The Tradition of Sharing

Help your friends and juniors by posting answers to the questions that you know. Also post questions that are not available.


To start with, Sr2Jr’s first step is to reduce the expenses related to education. To achieve this goal Sr2Jr organized the textbook’s question and answers. Sr2Jr is community based and need your support to fill the question and answers. The question and answers posted will be available free of cost to all.

 

#
Authors:
Barbara Dolye
Chapter:
Introduction To Computing And Programming
Exercise:
Exercises
Question:22 | ISBN:9781285096261 | Edition: 4

Question

What is produced when you run the following application?
Line 1 // Example program – displaying output.
Line 2 using System;
Line 3 namespace ExerciseI
Line 4 {
Line 5 class Problem2
Line 6 {
Line 7 static void Main( )
Line 8 {
Line 9 Console.Write("Go ");
Line 10 Console.Write("Laugh ");
Line 11 Console.WriteLine("Out Loud");
Line 12 Console.Write("Think ");
Line 13 Console.Write("Happy");
Line 14 }
Line 15 }
Line 16 }

TextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbook

Answer

The given program is 

using System;
namespace ExerciseI
{
    class Problem2
    {
        static void Main()
        {
            Console.Write("Go ");
            Console.Write("Laugh ");
            Console.WriteLine("Out Loud");
            Console.Write("Think ");
            Console.Write("Happy");
        }
    }
}
Output:

Go Laugh Out Loud
Think HappyPress any key to continue . . .

0 0

Discussions

Post the discussion to improve the above solution.