/**************************************************************************** * positive2.c * * Computer Science 50 * David J. Malan * * Demands that user provide a positive number. * * Demonstrates use of bool. ***************************************************************************/ #include #include int main(void) { // loop until user provides a positive integer bool thankful = false; do { printf("I demand that you give me a positive integer: "); if (GetInt() > 0) thankful = true; } while (thankful == false); printf("Thanks for the positive integer!\n"); }