Advertisement
Guest User

Photo Gallery

a guest
May 28th, 2017
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.14 KB | None | 0 0
  1. using System;
  2. class Program
  3. {
  4.     static void Main()
  5.     {
  6.         int photoNumber = int.Parse(Console.ReadLine());
  7.         int day = int.Parse(Console.ReadLine());
  8.         int month = int.Parse(Console.ReadLine());
  9.         int year = int.Parse(Console.ReadLine());
  10.         int hours = int.Parse(Console.ReadLine());
  11.         int minutes = int.Parse(Console.ReadLine());
  12.         int photoSizeInBytes = int.Parse(Console.ReadLine());
  13.         int widhtPhoto = int.Parse(Console.ReadLine());
  14.         int heightPhoto = int.Parse(Console.ReadLine());
  15.  
  16.         Console.WriteLine("Name: DSC_{0, 0:D4}.jpg", photoNumber);
  17.         Console.WriteLine("Date Taken: {0, 0:D2}/{1, 0:D2}/{2, 0:D4} {3, 0:D2}:{4, 0:D2}",
  18.             day, month, year, hours, minutes);
  19.  
  20.         // TODO: This place is for calculated size !!!!
  21.  
  22.         if (widhtPhoto < heightPhoto) Console.Write("Resolution: {0}x{1} (portrait)", widhtPhoto, heightPhoto);
  23.         else if (widhtPhoto > heightPhoto) Console.Write("Resolution: {0}x{1} (landscape)", widhtPhoto, heightPhoto);
  24.         else Console.Write("Resolution: {0}x{1} (square)", widhtPhoto, heightPhoto);        
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement