Advertisement
shady_obeyd

03.Megapixels

Jun 5th, 2017
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.53 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _03.MegaPixels
  8. {
  9.     class MegaPixels
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             double imageWidth = int.Parse(Console.ReadLine());
  14.             double imageHeight = int.Parse(Console.ReadLine());
  15.  
  16.             double result = (imageWidth * imageHeight) / 1000000;
  17.  
  18.             Console.WriteLine($"{imageWidth}x{imageHeight} => {Math.Round(result, 1)}MP");
  19.         }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement