fork(1) download
  1. #include<stdio.h>
  2. #include<iostream>
  3. #include<math.h>
  4. using namespace std;
  5. float pkt(float x, int n) {
  6. float sr, result;
  7. if (n == 0) {
  8. result = 1;
  9. } else {
  10. result = (pkt(x, n - 1) * x) ;
  11. }
  12. return result;
  13. }
  14. int main()
  15. {
  16. cout<<pkt(4,2)+ sqrt(4);
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
18