You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
761 B
37 lines
761 B
3 weeks ago
|
#include <stdio.h>
|
||
|
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(' ');
|
||
|
}
|
||
|
}
|