Ledger Nano X - The secure hardware wallet
SHARE
TWEET

MultiplyBy2

a guest Apr 7th, 2020 149 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace MultiplyBy2
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double output = 0;
  10.             for (int i = 0; i < double.MaxValue; i++)
  11.             {
  12.                 double numbers = double.Parse(Console.ReadLine());
  13.                 if (numbers < 0)
  14.                 {
  15.                     Console.WriteLine("Negative number!");
  16.                     break;
  17.                 }
  18.                 else
  19.                 {
  20.                     output = numbers;
  21.                 Console.WriteLine($"Result: { output * 2:f2}");
  22.                 }
  23.             }
  24.         }
  25.     }
  26. }
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