How to calculate the volume of cuboid in C++

1 Answer

0 votes
#include <iostream>

int main() {
   float length, width, height;
          
    length = 6;
    width = 4;
    height = 5;
          
    float volume = height * width * length;
         
    std::cout << "Volume of Cuboid = " << volume;
    
    return 0;
}
  
  
  
   
/*
run:
   
Volume of Cuboid = 120
   
*/

 



answered Sep 10, 2021 by avibootz

Related questions

1 answer 120 views
120 views asked Sep 10, 2021 by avibootz
1 answer 151 views
1 answer 129 views
1 answer 128 views
1 answer 162 views
1 answer 283 views
1 answer 147 views
...