Advertisement
mmayoub

MyDate Main Program

Dec 16th, 2022
718
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.59 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp17
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             Console.WriteLine("Hello World!");
  10.  
  11.             MyDate d = new MyDate(25, 3, 2012);
  12.             Console.WriteLine(d.getDay());
  13.             Console.WriteLine(d.getMonth());
  14.             Console.WriteLine(d.getYear());
  15.  
  16.             d.setDay(70);
  17.             d.setMonth(7);
  18.             d.setYear(2023);
  19.  
  20.             Console.WriteLine(d.getDay());
  21.             Console.WriteLine(d.getMonth());
  22.             Console.WriteLine(d.getYear());
  23.         }
  24.     }
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement