/****************************************************************************
 * positive2.c
 *
 * Computer Science 50
 * David J. Malan
 *
 * Demands that user provide a positive number.
 *
 * Demonstrates use of bool.
 ***************************************************************************/
 
#include <cs50.h>
#include <stdio.h>
 
int
main(int argc, char *argv[])
{
    bool thankful = false;
 
    // loop until user provides a positive integer
    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");
}