I am new to C and I am working for an assignment for school and I was hoping I could get some help if possible.
for some reason this do while loop doesn't work the way I want it to. Even when I enter "A" or "P" it keeps going over and over.
Can someone please help me with this?
Thank you very much.
printf("Please enter A (for AM) or P (for PM): ");
ampm = getchar();
}while( (ampm = getchar() ) !='A' || (ampm = getchar() ) !='P' );