Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace P03_PhotoGallery
- {
- class Program
- {
- static void Main(string[] args)
- {
- int photoNum = 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 minutes = int.Parse(Console.ReadLine());
- int photoSize = int.Parse(Console.ReadLine());
- int width = int.Parse(Console.ReadLine());
- int height = int.Parse(Console.ReadLine());
- Console.WriteLine($"Name: DSC_{photoNum:d4}.jpg");
- Console.WriteLine("Date Taken: {0:d2}/{1:d2}/{2} {3:d2}:{4:d2}", day, month, year, hours, minutes);
- if (photoSize<1000)
- {
- Console.WriteLine("Size: {0}B", photoSize);
- }
- else if (photoSize < 1000000)
- {
- photoSize /= 1000;
- Console.WriteLine("Size: {0}KB", photoSize);
- }
- else
- {
- photoSize /= 1000000;
- Console.WriteLine("Size: {0}MB", photoSize);
- }
- if (width > height)
- {
- Console.WriteLine($"Resolution: {width}x{height} (landscape)");
- }
- else if (height>width)
- {
- Console.WriteLine($"Resolution: {width}x{height} (portrait)");
- }
- else if (height == width)
- {
- Console.WriteLine($"Resolution: {width}x{height} (square)");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment