/* This one only prints out one bar at the end. */ #include // Inlcude the following to define the INT_MAX constant #include int main() { int min, n, stop ; int count, matched ; printf("Enter a positive number (type 'quit' to end): \n") ; min = INT_MAX ; stop = 0 ; count = 0 ; while (!stop) { printf("Enter a positive number (type 'quit' to end): \n") ; matched = scanf("%d", &n) ; if (matched <= 0) { stop = 1 ; while (count < n) { count = count + 1 ; printf("*") ; } } else { count = count + 1 ; if (n < min) min = n; } } count = 0 ; if ( count > 0 ) { printf("No numbers were entered.\n") ; } return 0 ; }