Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Models / CellFormula.cpp
diff options
context:
space:
mode:
Commit08df0c2e39e87512d0f83732cddf8ee26050d8d3 (patch)
Author
 Syndamia <kamen@syndamia.com>
2022-05-29 10:29:33 +0300
Committer
 Syndamia <kamen@syndamia.com>
2022-05-29 10:29:33 +0300
Files9b4f2aeeac4dabd5bbe27dceafb7625faff90af4 /src/Models/CellFormula.cpp
FMI-OOP-P2_Tables-08df0c2e39e87512d0f83732cddf8ee26050d8d3.tar
FMI-OOP-P2_Tables-08df0c2e39e87512d0f83732cddf8ee26050d8d3.tar.gz
FMI-OOP-P2_Tables-08df0c2e39e87512d0f83732cddf8ee26050d8d3.zip
Parent1da2355d59383939e49db2ac12de6097b7372bdb (diff)
Autocommit at 29.05.2022 @ 10:29
1 files changed, 3 insertions, 3 deletions
-rw-r--r--src/Models/CellFormula.cpp6
diff --git a/src/Models/CellFormula.cpp b/src/Models/CellFormula.cpp
index caa1f5d..2425ea8 100644
--- a/src/Models/CellFormula.cpp
+++ b/src/Models/CellFormula.cpp
@@ -3,12 +3,12 @@
#include <cstring>
#include <iostream>
double pow(double x, unsigned y) {
- std::cout << x << " " << y << std::endl;
if (y == 0) return 1;
+ double res = x;
for (unsigned i = 1; i < y; i++)
- x *= x;
- return x;
+ res *= x;
+ return res;
}
double CellFormula::calculate(unsigned index) {