1. A First Book of ANSI C Fourth Edition Chapter 5 Repetition 2. Objectives Basic Loop Structures ThewhileStatement Computing Sums and Averages Using awhileLoop TheforStatement…