Saturday, 18 March 2017

Geeksforgeeks Solution For " a^b (Set 1) "

GeeksforGeeks Solution For School Domain .Below You Can Find The Solution Of Basic ,Easy ,Medium ,Hard .You Can Also Direct Submit Your Solution to Geeksforgeeks Same Problem .You Need to login then you can submit you answers 

Problem :- For two given positive numbers a and b. Find a^b.

Submit Your Solution :- Click Here 


Solution :- 

#include <iostream>
#include <math.h>
using namespace std;
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
       long long int a,b,c;
       cin>>a>>b;
       c=pow(a,b);
       cout<<c<<endl;

    }
    return 0;
}

Output:-


Geeksforgeeks Solution For " a^b (Set 1) "

No comments:
Write comments

Recommended Posts × +