Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace _04_Photo_Gallery
- {
- class Program
- {
- static void Main(string[] args)
- {
- int number = int.Parse(Console.ReadLine());
- int day = int.Parse(Console.ReadLine());
- int month = int.Parse(Console.ReadLine());
- int year = int.Parse(Console.ReadLine());
- int hour = int.Parse(Console.ReadLine());
- int minutes = int.Parse(Console.ReadLine());
- double size = double.Parse(Console.ReadLine());
- int width = int.Parse(Console.ReadLine());
- int height = int.Parse(Console.ReadLine());
- Console.WriteLine("Name: DSC_{0:d4}.jpg", number);
- Console.WriteLine("Date Taken: {0:d2}/{1:d2}/{2} {3:d2}:{4:d2}",
- day, month, year, hour, minutes);
- if (size < 1000)
- {
- Console.WriteLine("Size: {0}B", size);
- }
- else if (size < 1000000)
- {
- size /= 1000;
- Console.WriteLine("Size: {0}KB", size);
- }
- else
- {
- size /= 1000000;
- Console.WriteLine("Size: {0}MB", size);
- }
- 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
Advertisement