logo CodeStepByStep logo

Spending

Language/Type: VB if/else input redundancy

The following code is poorly structured. Rewrite it so that it has a better structure and avoids redundancy. To help eliminate redundancy, convert the code into a function named Spending that accepts as a parameter a string for a single person's name, and prints the appropriate information about that person's bills. Your subroutine could be called twice (once for John and once for Jane) to replicate the original code's behavior.

Function: Write a VB function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.