You will create a program to display dates until the year's end starting with today and proceeding in one-week steps.
using System; class Program{// w w w . j av a2s. c o m static void Main(string[] args){ // Today DateTime today = DateTime.Today; int thisYear = today.Year; // Repeating DateTime date = today; do { // Output Console.WriteLine(date.ToLongDateString()); // Preparing next output (a week later) date = date.AddDays(7); } while (date.Year == thisYear); } }