#include <iostream>
#define PI 3.1415f
int main(int argc, char** argv)
{
float h=0.0f, r=0.0f;
std::cout << "Enter height: ";
std::cin >> h;
std::cout << "Enter radius: ";
std::cin >> r;
(r <= 0.0f || h <= 0.0f) ? std::cout << "ERROR!" :std::cout << "V = " << PI * r * r * h;
return 0;
}
#include <iostream>
#define PI 3.1415f
int main(int argc, char** argv)
{
float h=0.0f, r=0.0f;
std::cout << "Enter height: ";
std::cin >> h;
std::cout << "Enter radius: ";
std::cin >> r;
(r <= 0.0f || h <= 0.0f) ? std::cout << "ERROR!" :std::cout << "V = " << PI * r * r * h;
return 0;
}