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.PhotoGallery
- {
- class Program
- {
- static void Main(string[] args)
- {
- var photoNumber = int.Parse(Console.ReadLine());
- var day = int.Parse(Console.ReadLine());
- var month = int.Parse(Console.ReadLine());
- var year = int.Parse(Console.ReadLine());
- var hours = int.Parse(Console.ReadLine());
- var minutes = int.Parse(Console.ReadLine());
- var size = double.Parse(Console.ReadLine());
- var width = int.Parse(Console.ReadLine());
- var height = int.Parse(Console.ReadLine());
- Console.WriteLine($"Name: DSC_{photoNumber:d4}.jpg");
- Console.WriteLine($"Date Taken: {day:d2}/{month:d2}/{year:d4} {hours:d2}:{minutes:d2}");
- var sizeAb = "";
- if (size>=1000000)
- {
- size = size / 1000000.00;
- sizeAb = "MB";
- Console.WriteLine($"Size: {size:f1}{sizeAb}");
- }
- else if (size>= 1000)
- {
- size = size / 1000.00;
- sizeAb = "KB";
- Console.WriteLine($"Size: {size}{sizeAb}");
- }
- else
- {
- sizeAb = "B";
- Console.WriteLine($"Size: {size}{sizeAb}");
- }
- var resolution = "";
- if (width > height)
- {
- resolution = "landscape";
- }
- else if (width < height)
- {
- resolution = "portrait";
- }
- else
- {
- resolution = "square";
- }
- Console.WriteLine($"Resolution: {width}x{height} ({resolution})");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement