Using two types of loops (for and while) the program is supposed to count from 1 to 5, but I cannot get the while statement to work.
Code:#include <stdio.h> int main (void) { unsigned int i; printf ("This program counts from 1 to 5.\n"); printf ("Using a for loop:\n"); for (i=1; i <= 5, ++ 1) { printf ( "%u...", i); } printf ("\n"); printf ("Using a while loop:\n"); while ( i <= 5) { printf ("%u...", i); ++ 1; } printf ("done.\n"); }