Set Fde



Set Fde
write a c program to convert a binary no to its equivalent decimal no (and no. can be a float no.)?

please correction this program.

#include
#include

void main()

{
clrscr();

float no,fp,prf,fde=0,ans,ic=1;
int ip,ir,ide=0,ib=1,i=1,pri,set=0;

printf(“Enter the no:”);
scanf(“%f”,&no);

ip=no;
fp=no-ip;
printf(“fp=%fn”,fp);

while(ip!=0)
{
ir=ip%10;

if((ir<0)||(ir>1))
{
set=1;
break;
}

ip=ip/10;
ide=ide+(ir*ib);
ib=ib*2;
}

while((fp!=0)&&(i<5))
{
pri=(fp*10);
prf=(fp*10);
fp=prf-pri;
i++;

printf("fpnext=%f",fp);

if((pri<0)||(pri>1))
{
//set=1;
//break;
}
printf(“pri=%d nprf=%f “,pri,prf);

ic=ic/2;
fde=fde+(pri*ic);

}

ans=ide+fde;

if(set==1)
{
printf(“Wrong input! %f is not a Binary number”,no);
}
else
{
printf(“The equivalent Binay number is : %f”,ans);
}
getch();
}

#include

double getdouble(const char *prompt)
{
char buffer[512];
double number;

while(1) {
fputs(prompt, stdout);
fgets(buffer, sizeof buffer, stdin);
if(sscanf(buffer, “%lf”, &number) == 1)
return number;
}
}

int main()
{
/* It’s called a number, not a ‘no’, for the correct
definition of ‘no’ consult your nearest dictionary. */
double number;
double fp;
int ip;
int ir;

number = getdouble(“Enter the number: “);
ip = (int) number;
fp = number – ip;
printf(“fp=%lfn”, fp);
/* And now I give up because I don’t even know what
you’re trying to do, if you try to explain what you’re
trying to do more clearly I can help you further. */
return 0;
}

Snail racing with Fde T and Jonno da Ville PART 2


Baby Einstein - Language Nursery


Baby Einstein – Language Nursery


$7.98


If you’ve been around babies in the last few years, you’ve seen these newfangled toys that are abstract in color (or just black, white, and red) and make curious, crunching noises. Studies have shown that these types of toys stimulate newborns, expanding the capacity of their little sponge-like minds. That concept comes to the video age in Baby Einstein. This 30-minute tape is called a “video boar…

Joyas Musicales: Coleccion de Oro


Joyas Musicales: Coleccion de Oro


$12.98



Dragon Ball Z: Season Two (Namek and Captain Ginyu Sagas)


Dragon Ball Z: Season Two (Namek and Captain Ginyu Sagas)


$17.93


In the version that is shown on YTV in Canada the story begins mid-way through the Dragon Ball Z series. Raditz Gokuus brother has traveled to Earth to find out why Gokuu has not yet destroyed the planet as he was supposed to do. But while as a baby Gokuu was dropped (down a huge cliff) and forgot his real mission. Kakarot Gokuus real name battles his brother Raditzs along with former enemy Piccol…

Our Home's Fox Deity (Wagaya no Oinarisama) Premium DVD Boxed Set #2 (Eps #13-24)


Our Home’s Fox Deity (Wagaya no Oinarisama) Premium DVD Boxed Set #2 (Eps #13-24)


$47.99


Kugen meets its sibling, Gyokuyo, for the first time in centuries during the joyful clamor of the Culture Festival at Akagi. Though Kugen thought nothing of the time it remained sealed, Gyokuyo saw things differently. Swearing revenge on the humans who harmed its only kin, Gyokuyo plots various schemes. Even more trouble comes to the Takagami brothers involving gods, werewolves, and the lost clan …







FDS Spray, Extra Strength, 2-Ounces (Pack of 12)


FDS Spray, Extra Strength, 2-Ounces (Pack of 12)


$19.99


FDS spray contains a patented, time released ingredient that is moisture activated. That means FDS works with your body to absorb moisture and neutralize odors throughout the day, so you feel shower fresh anytime or anywhere….

L'Oreal Paris Feria Multi-Faceted Shimmering Colour, Midnight Collection


L’Oreal Paris Feria Multi-Faceted Shimmering Colour, Midnight Collection



Permanent Haircolor Gel | 1 ApplicationMultifaceted Shimmering ColorMulti-faceted color with 3X highlights | Gentle Deep ConditioningIts advanced Silk & Shimmer Deep Conditioning hydrates and conditions week after week. Plus an aromatic scent for a pleasant colouring experience.Inspired by the runway, Feria’s Midnight Collection reveals the nuances and undertones of this iconic seductive shade. Cu…


Banzai One Set of Mega Boxing Gloves


Banzai One Set of Mega Boxing Gloves


$22.50


Go for the knockout with these safe, fun inflatable boxing gloves. Gloves measure 25 in L x 18 inch W x 14 inch H….

Disney P Is for Pooh 4 Piece Baby Crib Bedding Set Set Quilt Bumper Sheet Dust Ruffle


Disney P Is for Pooh 4 Piece Baby Crib Bedding Set Set Quilt Bumper Sheet Dust Ruffle


$55.92


includes: Comforter, Crib Sheet, Bumper and Dust Ruffle…

Star Wars 3.75 Inch Battle Pack Battle Game Stop the Zillo Beast


Star Wars 3.75 Inch Battle Pack Battle Game Stop the Zillo Beast


$10.23


Each pack comes with 3 of your favorite Star Wars characters. It also includes Galactic Battle Game Cards for even more fun play. Reenact your favorite movie scenes and live your favorite Star Wars battles. Each character has realistic styling and detail. Collect all the battle packs to create the ultimate Star Wars battles and adventures.Product Dimensions (inches): 1.7 (L) x 12 (W) x 6 (H)Age: 4…


You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.