Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- read_char();//read number
- d1=d0;
- read_char();
- d2=d0;
- read_char();
- d3=d0;
- //computation
- d4=0;
- d4=d4+d1;
- d4=d4+d2;
- d4=d4+d3;//d4 is now x
- d5=0;
- d5=1000;//d5 is now the numerator of the fraction (1000)
- d4=1+d4;//d4 is now the denominator of the fraction (1+x)
- d5=d5/d4;//d5 is now the quotient of d5/d4, and the whole inside of the brackets of our equation
- d5=d5-1;//the last arithmetic operation, d5 is now our result (y)
- //make d1,d2,d3 = digits of d5, d5 represented in binary.
- d1=d5%10;
- d5=d5/10;
- d2=d5%10;
- d5=d5/10;
- d3=d5%10;
- d0=13;
- write_char();//carriage return
- d0=10;
- write_char();//line feed
- d0=d3;
- write_char();//write y
- d0=d2;
- write_char();
- d0=d1;
- write_char();
- return 0; // exit
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement