summaryrefslogtreecommitdiff
path: root/agree.c
diff options
context:
space:
mode:
Diffstat (limited to 'agree.c')
-rw-r--r--agree.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/agree.c b/agree.c
new file mode 100644
index 0000000..48302d2
--- /dev/null
+++ b/agree.c
@@ -0,0 +1,15 @@
+#include <stdio.h>
+#include <cs50.h>
+
+int main(void)
+{
+ char c = get_char("Do you agree? ");
+ if (c == 'y')
+ {
+ printf("Agreed.\n");
+ }
+ else if (c == 'n')
+ {
+ printf("Not agreed.\n");
+ }
+}