nvnnaidenov

TrainingLab - School Book 2.1

Jul 21st, 2021
1,053
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. class TrainingLab
  4. {
  5.     static void Main()
  6.     {
  7.         double len;
  8.         double widht;
  9.  
  10.         len = double.Parse(Console.ReadLine());
  11.         widht = double.Parse(Console.ReadLine());
  12.  
  13.         double lenInCm = len * 100;
  14.         double widthInCm = widht * 100 - 100;
  15.  
  16.         int rows = (int)(lenInCm / 120);
  17.         int cols = (int)(widthInCm / 70);
  18.         int result = rows * cols - 3;
  19.  
  20.         Console.WriteLine(result);
  21.     }
  22. }
  23.  
RAW Paste Data