#include <iostream> #include <math.h> using namespace std; int nowe_a, nowe_b; int ostatnia(int a, int b) { int pot = pow(a, b); int wynik = pot % 10; cout << wynik << endl; return wynik; } int main() { cout << ostatnia(11, 2) << '\n'; return 0; }
Standard input is empty
1 1
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!