



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
The use of repetition statements in c programming, specifically the while statement, and provides an example of a program that outputs the square of a number repeatedly until it reaches 1024. Additionally, it explains how to write a program to find the average of a given number of user-inputted numbers.
Typology: Study notes
1 / 5
This page cannot be seen from the preview
Don't miss anything!
Repetition statements allow you to specify that an action isto be repeated while some condition remains true
The while statement is one type of repetition statement int product = 2; while (product <= 1000) { product = 2 * product; printf (“%d\n”, product); } printf (“%d\n”, product); - What does this program output?
Write a program to find the average of 10 numbers that areentered by the user
Then modify the program to find the average of as manynumbers as the user wants. In other words, ask the user forhow many numbers he would like to find the average?