SHARE
TWEET

Untitled

a guest Oct 21st, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3.     class Program
  4.     {
  5.         static void Main()
  6.         {
  7.             double num = double.Parse(Console.ReadLine());
  8.             string outMernaEdinica = Console.ReadLine();
  9.             string inMernaEdinica = Console.ReadLine();
  10.            
  11.             if (outMernaEdinica == "m" && inMernaEdinica == "cm")
  12.             {
  13.                num = num * 100;
  14.             }
  15.             else if (outMernaEdinica == "mm" && inMernaEdinica == "m")
  16.             {
  17.                 num = num / 1000;
  18.             }
  19.             else if (outMernaEdinica == "cm" && inMernaEdinica == "mm")
  20.             {
  21.                 num = num * 10;
  22.             }
  23.             Console.WriteLine("{0:F3}", num);
  24.         }
  25.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top