0

How to do a^16 in c++

9th Nov 2019, 11:07 AM
Filip Catalin
Filip Catalin - avatar
10 ответов
+ 3
~ swim ~ ah, I didn't knew that. Thank you for telling me. :)
9th Nov 2019, 11:35 AM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar
+ 1
~ swim ~ it works with pow(a,16)
9th Nov 2019, 12:32 PM
Filip Catalin
Filip Catalin - avatar
+ 1
#include <iostream> #include <cmath> using namespace std; int power(int a, int b) { int p = 1, i = 1; while (i <= b) { p = p * a; i++; } return p; } int main() { // you can use the default pow() function instead of power() return 0; }
10th Nov 2019, 10:40 AM
Tarek Hammami
Tarek Hammami - avatar
0
It works but at pbinfo it gives me only 30 points from 100
9th Nov 2019, 12:26 PM
Filip Catalin
Filip Catalin - avatar
0
🍇 Alex Tusinean 💜 It works but at pbinfo it gives me only 30 points from 100
9th Nov 2019, 12:27 PM
Filip Catalin
Filip Catalin - avatar
0
a**16
11th Nov 2019, 8:00 AM
JudeDavis1
JudeDavis1 - avatar
0
(a*a)*16
11th Nov 2019, 8:02 AM
JudeDavis1
JudeDavis1 - avatar