[Courses] lesson 8 calculator - improved
Eugene Teo
eugene.teo at eugeneteo.net
Wed Nov 13 15:39:42 EST 2002
Btw, feel free to ask me about my code if you do not understand.
It is quite simple :)
Eugene
<quote who="Eugene Teo">
> Sure. Look at the content of my source code. I have some requests :)
>
> example:
>
> ./a.out 1 2 + 2 - 3 / .
> ./a.out 2 3 / 4 - 2 + 1 .
>
> . is a terminating expression
>
> Ok, it is not as what I wanted. what I wanted is:
>
> ./a.out 1 2 2 3 + - / .
> ./a.out 2 3 4 2 1 / - + .
>
> Perhaps someone can improve on it.
>
> Eugene
>
> <quote who="KWMelvin">
> > Maybe Eugene would be so kind as to show us what a postfix calculator is?
> > How about some source code?
> > How would a postfix calculator "improve" the calculator exercise?
> >
> > I rather like my `bc' arbitrary precision calculator that came with my
> > GNU/Linux distro, but I'm certainly not up to writing one like that.
> > --
> > K
> >
> > On Tue, Nov 12, 2002 at 12:29:33PM -0800, anca14 at anca14.ro wrote:
> > >
> > > postfix calculator ?
> > >
> > > On Tue, 12 Nov 2002, Eugene Teo wrote:
> > > >
> > > > hi guys,
> > > >
> > > > you might further improve it by writing a postfix
> > > > calculator :)
> > _______________________________________________
> > Courses mailing list
> > Courses at linuxchix.org
> > http://mailman.linuxchix.org/mailman/listinfo/courses
>
> --
> eMail: eugeneteo at eugeneteo.net, eugeneteo at null.cc.uic.edu
> gpg pub_key: http://null.cc.uic.edu/~eugeneteo/eugeneteo.asc
> main(i){putchar(182623909>>(i-1)*5&31|!!(i<7)<<6)&&main(++i);}
>
--
eMail: eugeneteo at eugeneteo.net, eugeneteo at null.cc.uic.edu
gpg pub_key: http://null.cc.uic.edu/~eugeneteo/eugeneteo.asc
main(i){putchar(182623909>>(i-1)*5&31|!!(i<7)<<6)&&main(++i);}
More information about the Courses
mailing list