-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
nkchuykin
committed
Aug 28, 2022
1 parent
69a9762
commit 9980639
Showing
5 changed files
with
176 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
#include <stdio.h> | ||
|
||
int x; | ||
int t; | ||
|
||
void op1() { | ||
t = 1; | ||
printf("%d\n", t); | ||
} | ||
void op23() { | ||
t = 23; | ||
printf("%d\n", t); | ||
} | ||
void op4() { | ||
t = 4; | ||
printf("%d\n", t); | ||
} | ||
void op5() { | ||
t = 5; | ||
printf("%d\n", t); | ||
} | ||
void op10() { | ||
t = 10; | ||
printf("%d\n", t); | ||
} | ||
|
||
void test_switch() { | ||
switch (x) { | ||
case 1: | ||
op1(); | ||
break; | ||
case 2: | ||
case 3: | ||
op23(); | ||
break; | ||
case 4: | ||
op4(); | ||
case 5: | ||
op5(); | ||
break; | ||
case 6: | ||
default: | ||
op10(); | ||
break; | ||
} | ||
} | ||
|
||
int main() { | ||
x = 0; | ||
printf("%d\n", x); | ||
test_switch(); | ||
x = 1; | ||
printf("%d\n", x); | ||
test_switch(); | ||
x = 2; | ||
printf("%d\n", x); | ||
test_switch(); | ||
x = 3; | ||
printf("%d\n", x); | ||
test_switch(); | ||
x = 4; | ||
printf("%d\n", x); | ||
test_switch(); | ||
x = 5; | ||
printf("%d\n", x); | ||
test_switch(); | ||
x = 6; | ||
printf("%d\n", x); | ||
test_switch(); | ||
x = 7; | ||
printf("%d\n", x); | ||
test_switch(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#include <stdio.h> | ||
|
||
int x; | ||
int t; | ||
|
||
void op1() { | ||
t = 1; | ||
printf("%d\n", t); | ||
} | ||
void op23() { | ||
t = 23; | ||
printf("%d\n", t); | ||
} | ||
void op4() { | ||
t = 4; | ||
printf("%d\n", t); | ||
} | ||
void op5() { | ||
t = 5; | ||
printf("%d\n", t); | ||
} | ||
void op10() { | ||
t = 10; | ||
printf("%d\n", t); | ||
} | ||
|
||
void test_switch() { | ||
switch (x) { | ||
case 1: | ||
op1(); | ||
case 2: | ||
case 3: | ||
op23(); | ||
case 4: | ||
op4(); | ||
case 5: | ||
op5(); | ||
case 6: | ||
default: | ||
op10(); | ||
} | ||
} | ||
|
||
int main() { | ||
x = 0; | ||
printf("%d\n", x); | ||
test_switch(); | ||
x = 1; | ||
printf("%d\n", x); | ||
test_switch(); | ||
x = 2; | ||
printf("%d\n", x); | ||
test_switch(); | ||
x = 3; | ||
printf("%d\n", x); | ||
test_switch(); | ||
x = 4; | ||
printf("%d\n", x); | ||
test_switch(); | ||
x = 5; | ||
printf("%d\n", x); | ||
test_switch(); | ||
x = 6; | ||
printf("%d\n", x); | ||
test_switch(); | ||
x = 7; | ||
printf("%d\n", x); | ||
test_switch(); | ||
} |
9980639
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't able to retrieve PDD puzzles from the code base and submit them to github. If you think that it's a bug on our side, please submit it to yegor256/0pdd:
Please, copy and paste this stack trace to GitHub: