BubaLazi

3Megapixels

Jun 20th, 2017
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.55 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 ConsoleApp1
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.  
  14.             double widht = double.Parse(Console.ReadLine());
  15.             double height = double.Parse(Console.ReadLine());
  16.  
  17.             double pixels = (widht * height) / 1000000;
  18.             Math.Round(pixels, 1);
  19.            
  20.             Console.WriteLine("{0}x{1} => {2:F1}MP", widht, height, pixels);
  21.  
  22.  
  23.  
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment