Welcome to collectivesolver - Programming & Software Q&A. A website you can trust. All programs tested and works. Contact: aviboots(AT)netvision.net.il
GreenGeeks Web Hosting - Faster, Scalable & Eco-Friendly

BlueHost Web Hosting

Ecommerce Software - Best Ecommerce Platform Made for You - Free Trial

Ecommerce Software - Best Ecommerce Platform Made for You - Free Trial

getflywheel wordpress hosting


Distribute your Resume to 500+ Job Boards & Recruiters


7,917 questions

11,028 answers

573 users

How to calculate the volume of any cube in C#

1 Answer

0 votes
using System;

namespace ConsoleApplication_C_Sharp
{
    class Program
    {
        static void Main(string[] args)
        {
            double v = volume(3.13, 2.76, 6.21);

            Console.WriteLine("volume: {0}", v);
        }

        public static double volume(double length, double width, double height)
        {
            return length * width * height;
        }
    }
}


/*
run:
      
volume: 53.646948
  
*/

 




answered Mar 20 by avibootz
edited Mar 21 by avibootz
...