Untitled
unknown
c_cpp
a month ago
460 B
2
Indexable
Never
#include <iostream> using namespace std; int main() { double side; double volume; cout << "Podaj dlugosc boku szescianu: "; while (!(cin >> side) || side <= 0) { cin.clear(); cin.ignore(numeric_limits<streamsize>::max(), '\n'); cout << "Prosze podac liczbe dodatnia: "; } volume = side * side * side; cout << "Objetosc szescianu wynosi " << volume << endl; return 0; }
Leave a Comment