nishanth.molleti9's blog

By nishanth.molleti9, history, 12 months ago, In English,

I have been trying to solve this problem lately and I find that there is something wrong with it . Can someone help me solving it.

The code i used to solve it is attached below (in C language)



main() { double a,c; scanf("%lf",&a); if(0<=a<=35){ c=pow(2, a); printf("%.0lf",c); } }

Please help me out :)

  • Vote: I like it
  • -16
  • Vote: I do not like it

12 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

this solution is wrong, the answer isn't the sequence of powers of 2