Wednesday, February 16, 2005

On a roll...

I received feedback and grading on the Formal Methods 2 assignment that I did last semester and was chuffed (it's probably the hardest asignment I've done) to receive an "A". All the hard work pays off...sometimes. And today, I managed to crack a problem that I just couldn't get my head around yesterday: writing a little "C" program to accept a number base from a user (between 1 and 32), which then converts any number given in that base, e.g. binary (2), into the related denary (base 10) value, the sort we humans understand the best. So you would get back 22 for the input 2, followed by the input 10110. The problem was, we weren't allowed to use standard C library functions, so I had to devise a way to do this without using ATOI etc, anyhoo, it's a really silly program that I've put it here *link removed 8/2006* (run the .exe or change the extension on the .c file to .txt to have a look at the code), maybe I'll look back at it and laugh. Or more likely look back at it and wonder what the hell it's all about....Now we have to work out how to "plug it in" to the bigger "popit" system.....

0 Comments:

Post a Comment

<< Home