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 ComplexConditions
- {
- class Program
- {
- static void Main(string[] args)
- {
- var num = int.Parse(Console.ReadLine());
- var day = int.Parse(Console.ReadLine());
- var month = int.Parse(Console.ReadLine());
- var year = int.Parse(Console.ReadLine());
- var hour = int.Parse(Console.ReadLine());
- var minute = int.Parse(Console.ReadLine());
- var size = double.Parse(Console.ReadLine());
- var width = int.Parse(Console.ReadLine());
- var height = int.Parse(Console.ReadLine());
- var bytes = "";
- var orientation = "";
- if(width > height)
- {
- orientation = "landscape";
- }
- else if(width<height)
- {
- orientation = "portrait";
- }
- else if(width == height)
- {
- orientation = "square";
- }
- if(size <= 1024)
- {
- bytes = "B";
- }
- else if(size > 1024 && size <= 1048576)
- {
- size = size / 1000;
- bytes = "KB";
- }
- else if( size > 1048576 )
- {
- size = size / 1000000;
- bytes = "MB";
- }
- Console.WriteLine("Name: DSC_{0:D4}.jpg ", num);
- Console.WriteLine("Date Taken: {0:D2}/{1:D2}/{2:D2} {3:D2}:{4:D2}", day,month, year, hour, minute);
- Console.WriteLine("Size: {0}{1}", size, bytes );
- Console.WriteLine("Resolution: {0}x{1} ({2})", width, height, orientation);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment