Q:

Write a program in C# Sharp to compute what day will be tomorrow

0

 Write a program in C# Sharp to compute what day will be tomorrow.

Expected Output :

Today is : 17/09/2016
 The Tomorrow will be : 18/09/2016

All Answers

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

using System;

class dttimeex45
{
    static void Main()
    {
	Console.Write("\n\n Compute what day will be Tomorrow :\n");
	Console.Write("----------------------------------------\n");
	Console.WriteLine(" Today is : {0}", DateTime.Today.ToString("dd/MM/yyyy"));
	DateTime dt = GetTomorrow();
	Console.WriteLine(" The Tomorrow will be : {0} \n", dt.ToString("dd/MM/yyyy"));
    }
    static DateTime GetTomorrow()
    {
	return DateTime.Today.AddDays(1);
    }
}

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

total answers (1)

Similar questions


need a help?


find thousands of online teachers now