Created
February 6, 2012 14:21
-
-
Save ChiiAyano/1752343 to your computer and use it in GitHub Desktop.
SONY "GO FOR IT" Q.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// License: BSD | |
using System; | |
namespace LifeClock | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
int n = 80; | |
DateTime start = new DateTime(1990, 4, 16, 0, 0, 0); | |
DateTime end = new DateTime(start.Year + n, 12, 31, 23, 59, 59); | |
TimeSpan elapsed = TimeSpan.FromDays(((DateTime.Now - start).TotalSeconds / ((end - start).TotalSeconds))); | |
Console.WriteLine("今日は {0} 時 {1} 分 {2} 秒です。", elapsed.Hours, elapsed.Minutes, elapsed.Seconds); | |
Console.ReadKey(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment