Project 3-4
The volume of a box is calculated using the formula V = abc, where a, b, and c are the lengths of the box's sides. Write a program that calculates the volume of a box based on the input of the length of three sides by the user. Save the source code file as volbox.cpp. Compile, run, and test the program.
Edit: Code is attached!
about that you enter the 3 values and it just shuts you out this is how i coded it
//volbox.cpp
//Program to calculate the volume of a box based on 3 sides.
//by, Jonathon Prete
#include<iostream>
using std::cout;
using std::cin;
int main()
{
float a,b,c,V;
cout<<"enter the lengths of three sides of the box (A,B,and C)\n";
cout<<"\nWhat is the length of side A?:";
cin>>a;
cout<<"\nWhat is the length of side B?:";
cin>>b;
cout<<"\nWhat is the length of side C?:";
cin>>c;
V=a*b*c;
cout<<"\nThe volume of the box is: " <<V<< ".";
system("pause");
return 0;
}
edit: not sure if its just this computer or program running the c++ but its also happens with your quadratic calculator i enter the 3 values and then it just shuts down the program instead of giving me the answer