summaryrefslogtreecommitdiff
path: root/wk1/lect2
diff options
context:
space:
mode:
Diffstat (limited to 'wk1/lect2')
-rw-r--r--wk1/lect2/phone-book.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/wk1/lect2/phone-book.c b/wk1/lect2/phone-book.c
new file mode 100644
index 0000000..e37fa2b
--- /dev/null
+++ b/wk1/lect2/phone-book.c
@@ -0,0 +1,10 @@
+#include <stdio.h>
+#include <cs50.h>
+
+int main(void)
+{
+ string name = get_string("What's your name? ");
+ int age = get_int("What's your age? ");
+ string phone = get_string("What's your phone number? ");
+ printf("Age is %i. Name is %s. Number is %s. \n", age, name, phone);
+}