fishTank
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int length;
int width;
int height;
double procent;
cin >> length;
cin >> width;
cin >> height;
cin >> procent;
double ObemAkwarium = length * width * height;
double Litri = ObemAkwarium * 0.001;
double Procent = procent * 0.01;
double sum = Litri * (1-0.17);
cout.setf(ios::fixed);
cout.precision(3);
cout << sum ;
return 0;
}
Какъв е проблема тук?
Ето и как изглежда моят код :
#include <cmath>
#include <string>
using namespace std;
int main(){
int lenght,widht,height;
double percent;
cin>> lenght >> widht >> height >> percent;
int volume = lenght * widht * height;
double liters = volume * 0.001;
double result = liters - liters * (percent / 100);
cout.setf(ios::fixed);
cout.precision(3);
cout <<result << endl;
return 0;