include header files Finclede limitsh Tunction prototypes oid welcomeo fleat get
ID: 3593020 • Letter: I
Question
include header files Finclede limitsh Tunction prototypes oid welcomeo fleat getaverage loat yards, float carrics void display ideelare float variables float carries float yards fleat bestaverage INT MAX: float avg ); int sentinal-0 int input 1; calling welcome function welcomeo icontinuesly prompe user to enter carries and yards while(input sentinal) do printf nEnter carries:conk ficarriesc0) printil Invalid carries n) while(carriescO printf nlEnter yards: o iftyards0) printfl Invalid yards n whilelyardso avg petavcrago(yands,carries) print-Yards : %ryards); printr-Carries : %("carries); pred("Average : %'avgk avgdestas erage) bestaverage avg printi Enter O to stop or I to contie" scanR"%d",&i; put); display): printrnBest of average : %re staverage: return 0 wclcome Function definiton void welcome) pri Welcose to YourName Football Sutsan getaverage Function definiton float getaverage nout yards, t out carries) return yards carries; dispalay Function definiton void display print FirsaName LastName 09-10-2017Explanation / Answer
Start(0)
|
Display welcome
|
input = -1-----yes------->Display(4)--->Print Best average---Stop
|
input carries (2)
|
carries < 0 ----yes-----Go to (2)
|
input yards (3)
|
yards < 0 ----yes-----Go to (3)
|
Calculate Average
|
Average < Best average ----yes-----Best average = average --->Goto(5)
|
Receive input (5)
|
input = -1-----yes------->Goto (4)
|
NO
|
Go to (2)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.