Advertisement
Guest User

Untitled

a guest
Nov 8th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.74 KB | None | 0 0
  1. using System;
  2.     class MutantSquirrels
  3.     {
  4.         static void Main()
  5.         {
  6.             double Trees = double.Parse(Console.ReadLine());
  7.             double Branches = double.Parse(Console.ReadLine());
  8.             double Squirrels = double.Parse(Console.ReadLine());
  9.             double AverageTails = double.Parse(Console.ReadLine());
  10.  
  11.             double TotalTails = Trees * Branches * Squirrels * AverageTails;
  12.  
  13.             if (TotalTails % 2 == 0)
  14.             {
  15.                 TotalTails *= 376439;
  16.                 Console.WriteLine("{0:F3}", TotalTails);
  17.             }
  18.             else
  19.             {
  20.                 TotalTails /= 7;
  21.                 Console.WriteLine("{0:F3}", TotalTails);
  22.             }
  23.         }
  24.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement