Q:

C# program to demonstrate example of Console.Write() and Console.WriteLine()

belongs to collection: C# Basic Programs | basics

0

C# program to demonstrate example of Console.Write() and Console.WriteLine()

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

// C# program to demonstrate example of 
// Console.Write() and Console.WriteLine()
using System;
using System.IO;
using System.Text;

namespace IncludeHelp
{
    class Test
    {
        // Main Method 
        static void Main(string[] args)
        {

            Console.WriteLine("This is line1"); 
            Console.WriteLine("This is line2");
            Console.Write("This is line3");
            Console.Write("This is line4");            
            
            //hit ENTER to exit the program
            Console.ReadLine();
        }
    }
}

Output

This is line1
This is line2
This is line3This is line4

 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C# Basic Programs | basics

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
C# program to print a new line... >>
<< C# | Print messages/text (program to print Hello w...