// Demonstration of counting while loops // // Written by: Angela Finlayson // Date: 14/09/2024 #include // Try with limit of 3 int main(void) { // 1. Initialise loop counter before the loop int counter = 0; while (counter < 3) { // 2. check loop counter condition printf("%d Here we go loop de loop!\n", counter); counter = counter + 1; // 3. update loop counter } printf("%d Yay the loop ended!!!\n", counter); return 0; }