Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class Program
- {
- public static void Main()
- {
- 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 minutes = int.Parse(Console.ReadLine());
- double photoSize = double.Parse(Console.ReadLine());
- int width = int.Parse(Console.ReadLine());
- int height = int.Parse(Console.ReadLine());
- int resolution = width * height;;
- string size = "";
- if (photoSize < 1000)
- {
- size = "B";
- }
- else if (photoSize < 1000000)
- {
- photoSize /= 1000;
- size = "KB";
- }
- else
- {
- photoSize /= 1000000;
- size = "MB";
- }
- string orientation = "";
- if (height < width) {
- orientation = "landscape";
- }
- else if (width < height) {
- orientation = "portrait";
- }
- else {
- orientation = "square";
- }
- if (minutes > 59)
- {
- hours = hours + 1;
- minutes = minutes - 60;
- }
- if (hours > 23)
- {
- hours = 0;
- }
- Console.WriteLine($"Name: DSC_{photoNumber:D4}.jpg");
- Console.WriteLine($"Date Taken: {day:D2}/{month:D2}/{year:D4} {hours:D2}:{minutes:D2}");
- Console.WriteLine($"Size: {photoSize.ToString("0.#")}{size}");
- Console.WriteLine($"Resolution: {width}x{height} ({orientation})");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement