Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Linq;
- using System.Threading;
- namespace ConsoleApp1
- {
- class Exam
- {
- static void Main(string[] args)
- {
- double a = double.Parse(Console.ReadLine());
- double sheets = double.Parse(Console.ReadLine());
- double sheetArea = double.Parse(Console.ReadLine());
- double allSheatArea = 0;
- double boxArea = a * a * 6;
- for (int i = 1; i <= sheets; i++)
- {
- if (i % 3 == 0)
- {
- allSheatArea += sheetArea * 0.25;
- }
- else
- {
- allSheatArea += sheetArea;
- }
- }
- double percentage = allSheatArea / boxArea * 100.0;
- Console.WriteLine($"You can cover {percentage:f2}% of the box.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement