fork download
  1. #include <iostream>
  2. using namespace std;
  3. long int potega(int p, int w)
  4. {
  5. if (w==0) return 1;
  6. else return p*potega(p,w-1);
  7. }
  8. int main()
  9. {
  10. int ile,p,w;
  11. cin>>ile;
  12. for(int i=1; i<=ile; i++)
  13. {
  14. cin>>p>>w;
  15. cout<<potega(p,w)%10;<<endl;
  16. }
  17. }# your code goes here
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:15:30: error: expected expression
        cout<<potega(p,w)%10;<<endl;
                             ^
prog.cpp:17:2: error: expected unqualified-id
}# your code goes here
 ^
2 errors generated.
stdout
Standard output is empty