y 2fn as only option in c

Solutions on MaxInterview for y 2fn as only option in c by the best coders in the world

showing results for - "y 2fn as only option in c"
Luca
24 Feb 2019
1#include <stdio.h>
2
3int main() {
4
5    printf("Are you sure to continue? y/n ");
6
7    char c;
8
9    scanf(" %c", &c);
10
11    switch (c) {
12
13        case 'y':
14
15            printf("program continues\n");
16        break;
17
18        case 'n':
19            printf("program stops\n");
20        break;
21
22        default:
23            printf("wrong option\n");
24    }
25}
26
similar questions
queries leading to this page
y 2fn as only option in c