Explore BrainMass

Looping problem in C program code

This content was STOLEN from BrainMass.com - View the original, and get the already-completed solution here!

I have written the attached code which validates my entries and exits the program whether the entries are correct or not. What I am having problems with is looping back to make another location choice or re-enter a valid choice and to be able to re-enter a valid number for the sales amount when not valid.

© BrainMass Inc. brainmass.com December 20, 2018, 3:35 am ad1c9bdddf


Solution Preview

Code in attachment 260305.c has three loops inserted in your test.c code to handle the three ...

Solution Summary

Solution inserts three loops in given code to handle the three situations - making another location choice, re-entering a location choice when invalid, and re-entering a sales amount when invalid.