From a661b2e40a269dfe14fd6cf95d6aa8c1762895c2 Mon Sep 17 00:00:00 2001 From: pc9ha2xvl <2119910569@qq.com> Date: Fri, 22 Nov 2024 17:25:44 +0800 Subject: [PATCH] ADD file via upload --- step1.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 step1.c diff --git a/step1.c b/step1.c new file mode 100644 index 0000000..396a9ce --- /dev/null +++ b/step1.c @@ -0,0 +1,36 @@ +#include +void print_spaces(int num_spaces); + +int main() { + print_spaces(30); + printf("1. Input\n"); + print_spaces(30); + printf("2. Output\n"); + print_spaces(30); + printf("3. Order\n"); + print_spaces(30); + printf("4. Quit\n"); + char a; + scanf("%c",&a); + switch(a){ + + case 'i':printf("You are trying to Input info"); + break; + case 'o':printf("You are trying to Output info"); + break; + case 'm':printf("You are trying to Make things ordered"); + break; + case 'q':printf("You are about to Quit"); + break; + default:printf("Wrong input"); + break; + return 0; +} + +} +void print_spaces(int num_spaces) { + int i; + for (i = 0; i < num_spaces; i++) { + putchar(' '); + } +}