Task: | Pizzat |
Sender: | SillyBilly |
Submission time: | 2024-10-29 11:51:35 +0200 |
Language: | C++ (C++17) |
Status: | COMPILE ERROR |
Compiler report
input/code.cpp: In function 'int main()': input/code.cpp:7:7: error: redeclaration of 'int slices' 7 | int slices = pizza * slices; | ^~~~~~ input/code.cpp:4:22: note: 'int slices' previously declared here 4 | int people, pizza, slices; | ^~~~~~
Code
#include <iostream> int main() { int people, pizza, slices; std::cin>>people>>pizza>>slices; int slices = pizza * slices; int least = slices / people; int most = (slices + people -1) / people; std::cout<<most<<least<<std::endl; }