Hi
Here is the problem
http://www.spoj.pl/problems/LASTDIG/
Here is the code
but it doesn't accept it what's wrong with it
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int c;
cin >> c;
for(c; c > 0; c--){
double a, b, last = 0;
cin >> a >> b;
double res = pow(a, b);
last = res - ((static_cast<int>(res) / 10) * 10);
cout << last << endl;
}
}