With respect, you have the problem in English. Your assignment is to write a program in Perl to solve the problem. If you don't know where to begin perlintro or tutorials->Getting Started with Perl is the best place to begin.
| [reply] |
Thanks for admitting this is homework. It's a refreshing breath of honesty for such questions.
I don't know where to start or how to start
Start with the links that marto just gave you, combined with the textbook or class notes from the class you are taking.
- Figure out the math for how to solve that problem manually. It is a simple math problem, and if you are advanced enough in your education to be taking a class on Perl programming, you should be able to solve it. If you need help with the math, perlmonks isn't really the place, because that's a math question, not a Perl programming question.
- Translate that math into Perl syntax. Your textbook or class notes should have examples of how to do the simple math functions required.
| [reply] |