Created
February 4, 2019 22:15
-
-
Save igorLisovitskiy/d47af660d2b20dc5d96e2c2ada43204a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int RoomLength = 6; | |
int RoomWidth = 2; | |
int RoomHeigth = 3; | |
double WallpaperWidth = .5; | |
int WallpaperLength = 10; | |
// wallpaper pieces | |
double numberOfDrops = (6 * 2 + 2 * 2) / 0.5; // two walls by their width = 32 | |
// wallpaper length | |
double requiredWallpaperLength = numberOfDrops * RoomHeigth; // 96 | |
// calculating the number of rolls | |
double numberOfrolls = requiredWallpaperLength / WallpaperLength; // 9.6 ~ 10 | |
Console.WriteLine($"Number of rolls required: {Math.Ceiling(numberOfrolls)}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://www.calc.ru/Tablitsa-Oboyev.html