here is my code:
include <bits/stdc++.h>
using namespace std;
int main() { double a,b; double sum=0;
cin >> a>>b;
sum = pow(a,b)-pow(b,a); cout << sum<< endl; return 0; }
why it is showing wrong answer on test 5 no matter whay i do.
question: You are given natural numbers a and b. Find ab-ba.
Input
Input contains numbers a and b (1≤a,b≤100).
Output
Write answer to output.
Sample Input
2 3
Sample Output
-1