Search
 
SCRIPT & CODE EXAMPLE
 

CPP

how to write something in power of a number in c++

#include <iostream>
#include <cmath>
using namespace std;
int main(){
  cout<<pow(10,2);
  return 0;
}
Comment

how to use power in c++

// CPP program to illustrate
// power function
#include <bits/stdc++.h>
using namespace std;
 
int main()
{
    double x = 6.1, y = 4.8;
 
    // Storing the answer in result.
    double result = pow(x, y);
 
    // printing the result upto 2
    // decimal place
    cout << fixed << setprecision(2) << result << endl;
 
    return 0;
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: sort stl 
Cpp :: reverse c++ 
Cpp :: iterating in map/unordered map c++ 
Cpp :: scan line in c++ 
Cpp :: run c++ program in mac terminal 
Cpp :: C++ Find the sum of first n Natural Numbers 
Cpp :: data types ranges c++ 
Cpp :: sort vector using marge sorting in c++ 
Cpp :: random number generator c++ between 0 and 1 
Cpp :: c++ int main() 
Cpp :: Write C++ program to sort an array in ascending order 
Cpp :: c++ fizzbuzz 
Cpp :: cpp init multidimensional vector 
Cpp :: less than operator overloading in c++ 
Cpp :: overload stream extract cpp 
Cpp :: setprecision c++ 
Cpp :: ubuntu dotnet core install 
Cpp :: C++ program that prints the prime numbers from 1 to 1000. 
Cpp :: struct and pointer c++ 
Cpp :: c++ int 
Cpp :: cstring to string 
Cpp :: stringstream stream number to string 
Cpp :: find prime number c++ 
Cpp :: c++ add to array 
Cpp :: min heap priority queue c++ 
Cpp :: lua table contains 
Cpp :: Find minimum maximum element CPP 
Cpp :: c #define 
Cpp :: descending order c++ 
Cpp :: use of alphanumeric function c++, check if alphabet or digit from string 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =