How to calculate the volume of a box in C#

1 Answer

0 votes
using System;

public class CalculateVolumeBox_CSharp
{
    public static void Main(string[] args)
    {
        int l = 50, w = 21, h = 15;
        
        int boxvolume = l * w * h;
 
        Console.WriteLine("box volume = {0} cm^3", boxvolume);
    }
}


/*
run

box volume = 15750 cm^3

*/


answered Apr 9, 2014 by avibootz
edited Sep 15, 2024 by avibootz

Related questions

1 answer 94 views
1 answer 87 views
1 answer 103 views
103 views asked Sep 15, 2024 by avibootz
1 answer 94 views
1 answer 114 views
1 answer 138 views
138 views asked Sep 10, 2021 by avibootz
1 answer 167 views
...