Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int photoNumber = int.Parse(Console.ReadLine());
- int day = int.Parse(Console.ReadLine());
- int month = int.Parse(Console.ReadLine());
- int year = int.Parse(Console.ReadLine());
- int hours = int.Parse(Console.ReadLine());
- int mins = int.Parse(Console.ReadLine());
- int photoSize = int.Parse(Console.ReadLine());
- int width = int.Parse(Console.ReadLine());
- int height = int.Parse(Console.ReadLine());
- DateTime dt = DateTime.ParseExact
- ($"{day}/{month}/{year} {hours}:{mins}", "d/M/yyyy H:m", null);
- Console.WriteLine($"Name: DSC_{photoNumber:d4}.jpg");
- Console.WriteLine($"Date Taken: {dt.ToString("dd'/'MM'/'yyyy HH:mm")}");
- if (photoSize < 1000)
- Console.WriteLine($"Size: {photoSize}B");
- else if (photoSize < 1000000)
- Console.WriteLine($"Size: {Math.Round(photoSize / 1000.0, 1)}KB");
- else if (photoSize < 1000000000)
- Console.WriteLine($"Size: {Math.Round(photoSize / 1000000.0, 1)}MB");
- string orientation = string.Empty;
- if (width > height) orientation = "(landscape)";
- else if (width < height) orientation = "(portrait)";
- else orientation = "(square)";
- Console.WriteLine($"Resolution: {width}x{height} {orientation}");
Advertisement
Add Comment
Please, Sign In to add comment