2018-05-05 23:19:22 +01:00

26 lines
527 B
C

#include <stdio.h>
#include <stdbool.h>
int main()
{
bool CustomerHasItems = true;
int CustomerItemCount = 5;
/*
* This is a while loop.
* It functions similar to the for-loop,
* but, instead of counting up a variable, it only
* checks for the condition.
*/
while(CustomerHasItems)
{
// TODO: Process the items
printf("Scanning a product. %d to go.\n", CustomerItemCount);
// TODO: check if there are still items to process
// and set CustomerHasItems appropriately
CustomerHasItems = false;
}
}