skipter icon

C# Megapixels / Basics

skipter | PRO | 06/07/17 08:02:58 PM UTC | 0 ⭐ | 318 👁️ | Never ⏰ | []
C# |

540 B

|

None

|

0 👍

/

0 👎

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace p._3_Megapixels
{
    class Program
    {
        static void Main(string[] args)
        {
            int width = int.Parse(Console.ReadLine());
            int height = int.Parse(Console.ReadLine());
 
            double pixels = (width * height);
            double diversion = pixels / 1000000;
            Console.WriteLine("{0}x{1} => {2}MP", width, height, Math.Round(diversion, 1));
        }
    }
}

Comments