fbinnzhivko

Untitled

May 1st, 2017
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.36 KB | None | 0 0
  1. using System;
  2. class Program
  3. {
  4.     static void Main()
  5.     {
  6.         int wormLenght = int.Parse(Console.ReadLine())*100;
  7.         double wormWidth = double.Parse(Console.ReadLine());
  8.  
  9.         if (wormLenght % wormWidth == 0) Console.WriteLine("{0:f2}", wormLenght * wormWidth);
  10.         else Console.WriteLine("{0:f2}%", wormLenght  * 100 / wormWidth);
  11.     }
  12. }
Add Comment
Please, Sign In to add comment