This code takes a number input from a text box, uses a while loop to increment a counter and track variable until the counter exceeds the input number, then divides the track variable by the counter to calculate the average and displays the number and result on a label.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
29 views
Exercise 6
This code takes a number input from a text box, uses a while loop to increment a counter and track variable until the counter exceeds the input number, then divides the track variable by the counter to calculate the average and displays the number and result on a label.