Files
CS50---Harvard/src1/agree2.c
T
2026-05-28 10:16:10 +00:00

21 lines
302 B
C

// Logical operators
#include <cs50.h>
#include <stdio.h>
int main(void)
{
// Prompt user to agree
char c = get_char("Do you agree? ");
// Check whether agreed
if (c == 'Y' || c == 'y')
{
printf("Agreed.\n");
}
else
{
printf("Not agreed.\n");
}
}