Pergunta de entrevista da empresa Cisco

Please write code to compute x^x without using multiple

Respostas da entrevista

Sigiloso

17 de fev. de 2011

Use two for loops

Sigiloso

1 de abr. de 2013

We can do this by taking the logarithm also

1

Sigiloso

31 de ago. de 2015

#include using namespace std; int xxx(int x, int val) { if(val > 0) { int result = 0; for(int k=0;k> x; // your code goes here int answer = xxx(x,x); cout << answer; return 0; }

Sigiloso

3 de ago. de 2011

int mul(int x,int y){ int z=0; while(y!=0){ if((y&1)==1) z=z+x; y=y>>1; x=x<<1; } return z; }