I am having trouble on how to write a Josephus program.... could someone send me the josephus program in C too [email protected] I would be very thankful.
Printable View
I am having trouble on how to write a Josephus program.... could someone send me the josephus program in C too [email protected] I would be very thankful.
What exactly is a Josephus program?
My brother Josephus wrote a program once.
Make sure you have read this...
http://www.cprogramming.com/cboard/a...p?s=&forumid=3
...but I, too, am curious about what it actually is.
There's an algorithm here. If you can't convert it to C, doing a search on google might help.
I was reading the reccomended site and wondered what does @ do? By the way, what language was that in?
i'm guessing it's pascal, it looked a lot like basic though... and it's not that hard to follow so you can plug it in yourself...
Must be pascal. Gosub *v(1,2,3) is not valid in BASIC. It would have to be changed to gosub 40 or another valid line number.
There are no official pointers in BASIC. You can do them, but it is not at all like C or PASCAL. The * character in BASIC means multiply and nothing else. This codes also looks a bit strange to even be Pascal, though.
It's definately not pascal code. I've written pascal some 5 years ago. Pascal's more C-like language.
It's UBasic. Don't know what it means though, probably Ugly-Basic or something :p PASCAL looks waaaaaaay more structured.
Edited to add:
I am having trouble with girls.... could someone send me the girl of my dreams to nvoigt@... I would be very thankful. :p:p:p
@ is the remainder after integer division operator, (like our %).
http://www.math.utk.edu/~husch/401-9...c/ubhelp1.html
oh okay, well i was close! same thing! basik, pascal, fortran, cobol...it's all a blur (whizz!!!!) to me... :)