/*
Alex Mauk 9/13/22 Section 004 Lab 3
The user will choose oranges or apples in a loop until they type "q"
to exit the loop
*/
#include <stdio.h>

int main () {
  char userInput;
  int sum = 'a';
  
    
  printf("Enter an a for apple or o for orange, or q to quit: ");
  scanf(" %c", &userInput);
  while(userInput != 'Q'&& userInput != 'q'){
  if(userInput == 'a'|| userInput == 'A')
    printf("You chose apples!\n\n");
  else if(userInput == 'o'|| userInput == 'O')
    printf("You chose oranges!\n\n");
  else printf("You entered an invalid letter. \n\n");
  printf("Enter an a for apple or o for orange, or q to quit: ");
  scanf(" %c", &userInput);
  if(userInput == 'q'|| 'Q')
    printf("Goodbye!\n"); }
  return 0;
}
