diff --git a/Codeforce/.cph/.S_Interval.c_1b94b361f0f13dd43583f8db4c2252e7.prob b/Codeforce/.cph/.S_Interval.c_1b94b361f0f13dd43583f8db4c2252e7.prob index a68a166..7c3187e 100644 --- a/Codeforce/.cph/.S_Interval.c_1b94b361f0f13dd43583f8db4c2252e7.prob +++ b/Codeforce/.cph/.S_Interval.c_1b94b361f0f13dd43583f8db4c2252e7.prob @@ -1 +1 @@ -{"name":"S. Interval","group":"Codeforces - Sheet #1 (Data type - Conditions)","url":"https://codeforces.com/group/MWSDmqGsZm/contest/219158/problem/S","interactive":false,"memoryLimit":256,"timeLimit":1000,"tests":[{"input":"25.1\n","output":"Interval (25,50]\n","id":1697963846749},{"input":"25.0\n","output":"Interval [0,25]\n","id":1697963846713},{"input":"100.0\n","output":"Interval (75,100]\n","id":1697963846701},{"input":"-25.2\n","output":"Out of Intervals\n","id":1697963846718}],"testType":"single","input":{"type":"stdin"},"output":{"type":"stdout"},"languages":{"java":{"mainClass":"Main","taskClass":"SInterval"}},"batch":{"id":"5019b69e-321a-4b95-821a-b6f56f974c27","size":1},"srcPath":"h:\\Github\\Programming\\Codeforce\\S_Interval.c"} \ No newline at end of file +{"name":"S. Interval","group":"Codeforces - Sheet #1 (Data type - Conditions)","url":"https://codeforces.com/group/MWSDmqGsZm/contest/219158/problem/S","interactive":false,"memoryLimit":256,"timeLimit":1000,"tests":[{"input":"25.1\n","output":"Interval (25,50]\n","id":1697963846749},{"input":"25.0\n","output":"Interval [0,25]\n","id":1697963846713},{"input":"100.0\n","output":"Interval (75,100]\n","id":1697963846701},{"id":1697963846718,"input":"-25.2","output":"Out of Intervals"}],"testType":"single","input":{"type":"stdin"},"output":{"type":"stdout"},"languages":{"java":{"mainClass":"Main","taskClass":"SInterval"}},"batch":{"id":"5019b69e-321a-4b95-821a-b6f56f974c27","size":1},"srcPath":"h:\\Github\\Programming\\Codeforce\\S_Interval.c"} \ No newline at end of file diff --git a/Codeforce/.cph/.T_Sort_Numbers.c_c9eb2fcf86e2d763f3efc9328746364b.prob b/Codeforce/.cph/.T_Sort_Numbers.c_c9eb2fcf86e2d763f3efc9328746364b.prob new file mode 100644 index 0000000..ccaaeb5 --- /dev/null +++ b/Codeforce/.cph/.T_Sort_Numbers.c_c9eb2fcf86e2d763f3efc9328746364b.prob @@ -0,0 +1 @@ +{"name":"T. Sort Numbers","group":"Codeforces - Sheet #1 (Data type - Conditions)","url":"https://codeforces.com/group/MWSDmqGsZm/contest/219158/problem/T","interactive":false,"memoryLimit":256,"timeLimit":250,"tests":[{"input":"3 -2 1","output":"-2\n1\n3\n\n3\n-2\n1","id":1698039805450},{"input":"-2 10 0","output":"-2\n0\n10\n\n-2\n10\n0","id":1698039805441}],"testType":"single","input":{"type":"stdin"},"output":{"type":"stdout"},"languages":{"java":{"mainClass":"Main","taskClass":"TSortNumbers"}},"batch":{"id":"815b0211-7c3e-42ff-9257-509b2aba466c","size":1},"srcPath":"h:\\Github\\Programming\\Codeforce\\T_Sort_Numbers.c"} \ No newline at end of file diff --git a/Codeforce/.cph/.U_Float_or_int.c_b7d1212ebd7d5c1e4564037f3491ad93.prob b/Codeforce/.cph/.U_Float_or_int.c_b7d1212ebd7d5c1e4564037f3491ad93.prob new file mode 100644 index 0000000..80886d8 --- /dev/null +++ b/Codeforce/.cph/.U_Float_or_int.c_b7d1212ebd7d5c1e4564037f3491ad93.prob @@ -0,0 +1 @@ +{"name":"U. Float or int","group":"Codeforces - Sheet #1 (Data type - Conditions)","url":"https://codeforces.com/group/MWSDmqGsZm/contest/219158/problem/U","interactive":false,"memoryLimit":256,"timeLimit":1000,"tests":[{"input":"234.000","output":"int 234","id":1698040815223},{"input":"534.958","output":"float 534 0.958","id":1698040815247}],"testType":"single","input":{"type":"stdin"},"output":{"type":"stdout"},"languages":{"java":{"mainClass":"Main","taskClass":"UFloatOrInt"}},"batch":{"id":"ad0ce441-b5f7-4e21-ae91-6f0159d9551e","size":1},"srcPath":"h:\\Github\\Programming\\Codeforce\\U_Float_or_int.c"} \ No newline at end of file diff --git a/Codeforce/T_Sort_Numbers.c b/Codeforce/T_Sort_Numbers.c new file mode 100644 index 0000000..ad836ee --- /dev/null +++ b/Codeforce/T_Sort_Numbers.c @@ -0,0 +1,50 @@ +#include +int main() +{ + int a, b, c; + scanf("%d%d%d", &a, &b, &c); + if (a < b && a < c) + { + printf("%d\n", a); + } + else if (b < c) + { + printf("%d\n", b); + } + else + { + printf("%d\n", c); + } + + if (a < b && b < c) + { + printf("%d\n", b); + } + else if (b < a && a < c) + { + printf("%d\n", a); + } + else + { + printf("%d\n", c); + } + + if (a > b && a > c) + { + printf("%d\n", a); + } + else if (b > c) + { + printf("%d\n", b); + } + else + { + printf("%d\n", c); + } + + printf("\n%d\n", a); + printf("%d\n", b); + printf("%d\n", c); + + return 0; +} \ No newline at end of file diff --git a/Codeforce/U_Float_or_int.c b/Codeforce/U_Float_or_int.c new file mode 100644 index 0000000..34d09ce --- /dev/null +++ b/Codeforce/U_Float_or_int.c @@ -0,0 +1,18 @@ +#include +int main() +{ + float x; + scanf("%f", &x); + + if (x == .00) + { + printf("int %.0f", x); + } + else + { + int ans = x; + printf("float %d %.3f ", ans, x - ans); + } + + return 0; +} \ No newline at end of file