Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Spaceship
- {
- class Program
- {
- static void Main(string[] args)
- {
- double w = double.Parse(Console.ReadLine());
- double l = double.Parse(Console.ReadLine());
- double h = double.Parse(Console.ReadLine());
- double heightAustronavts = double.Parse(Console.ReadLine());
- double volumeRoket = w * l * h;
- double volumeRoom = (1.70 + 0.40) * 2 * 2;
- double placeFor = Math.Floor(volumeRoket / volumeRoom);
- if (placeFor <= 10 && placeFor >3 )
- {
- Console.WriteLine($"The spacecraft holds {placeFor} astronauts.");
- }
- else if (placeFor <= 3)
- {
- Console.WriteLine("The spacecraft is too small.");
- }
- else if(placeFor > 10)
- {
- Console.WriteLine("The spacecraft is too big.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement