--- On Wed, 11/3/09, praveen indian85 <[email protected]> wrote:


Sorry for the problem on my keyboard






#include<iostream.h>
main()
{
         int dec,bin,temp,i=0;
        printf("enter ur binary num";);
        scanf("%d",&bin);
       while(bin!=0)
      {
           temp=bin%10;
           dec=dec+temp*pow(2,i);
           bin=bin/10;
          i++;
}
prinf('%d",dec);
 
}

--- On Wed, 11/3/09, Thomas Hruska <[email protected]> wrote:


From: Thomas Hruska <[email protected]>
Subject: Re: [c-prog] binary to decimal without using arrey or pointer or 
function
To: [email protected]
Date: Wednesday, 11 March, 2009, 11:16 AM






rizwannu wrote:
> please tellme asimple code for converting binary to decimal in c==
> for example
> #include<iostream. h>
> main()
> {
> 
> tell me this code please please please
> 
> 
> 
> 
> return 0;
> }

Programming books aren't necessarily meant to be followed to the letter. 
Just because the author wants you to solve a problem doesn't 
necessarily mean you are ready to solve it. Several people here have 
already provided you with solutions. If you don't understand those and 
still can't comprehend the problem, just move on. You can skip an 
occasional problem here or there and come back to them later on when you 
are ready for them.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task. Stay on task.

http://www.CubicleS oft.com/MyTaskFo cus/

















Cricket on your mind? Visit the ultimate cricket website. Enter now!


      Check out the all-new Messenger 9.0! Go to http://in.messenger.yahoo.com/

[Non-text portions of this message have been removed]

Reply via email to