297 views
0 votes
0 votes
#include <stdio.h>
int cou=0;
int cal(int a,int b){
    int c;
    cou++;
    if(b==3)
    return(a*a*a);
    else{
        c=cal(a,b/3);
        return(c*c*c);
       
    }
}
int main() {
   int d= cal(4,81);
   printf("%d",d);
    
    return 0;
}

Please log in or register to answer this question.

Related questions

426
views
0 answers
0 votes
iarnav asked Jul 30, 2018
426 views
for every j != i in {0,....,n-1} is it like for j=0 to n-1; j !=i ; ++j
387
views
2 answers
0 votes
vijju532 asked Jul 18, 2018
387 views
#include<iostream>using namespace std;int main(){ int a[] = {10,20,30,40,50}; cout<<(*(&a+1)-a); return 0;}how th o/p is 5 ??
628
views
2 answers
0 votes
amit166 asked Jan 3, 2019
628 views
void main() { int i=6; for(--i; --i; i--) { printf(“%d”,i); } }
887
views
1 answers
1 votes
iarnav asked Jun 28, 2018
887 views
Consider the following program written in pseudo-code. Assume that x and y are integers. Count (x, y) { if (y !=2 ) { ... ============== My answer is 10220 and I just need someone to verify if it's correct.