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 112 views
112 views asked Sep 10, 2021 by avibootz
1 answer 145 views
1 answer 120 views
1 answer 119 views
1 answer 153 views
1 answer 273 views
1 answer 138 views
...