fork(1) download
  1. #include <stdio.h>
  2.  
  3. int U(int n)
  4. {
  5. if(n==0)return 4;
  6. else return V(n-1)+2*U(n-1);
  7. }
  8.  
  9. int V(int n)
  10. {
  11. if(n==0)return 1;
  12. else return V(n-1)+4*U(n-1)+2;
  13. }
  14.  
  15. int main(void)
  16. {
  17. printf("U(10)=%d\nV(10)=%d\n",U(10),V(10));
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0s 10304KB
stdin
Standard input is empty
stdout
U(10)=957913
V(10)=1495833