Chuyên mục

C++ Programming Tutorial 12 – Using Functions (pow function)

Rate this post

~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~ ✉️ Newsletter – 📸 Instagram – 🐦 Twitter …

Tag: pow c++, [vid_tags]

Xem thêm:


23 trả lời trong “C++ Programming Tutorial 12 – Using Functions (pow function)”

why are you using words like double when you are not doubling it dont make sense. i did a lil change dont know if correct but it makes better sense to me,

#include <iostream>

#include <cmath>

using std::cout;

using std::cin;

int main()


int base, exponent;

cout << "what is the base?: ";

cin >> base;

cout << "what is the exponent?: ";

cin >> exponent;

int power = pow(base, exponent);

cout << power << std::endl;

Trả lời

Email của bạn sẽ không được hiển thị công khai.