Skip to content

Commit

Permalink
upload
Browse files Browse the repository at this point in the history
  • Loading branch information
shakiliitju committed Oct 24, 2023
1 parent cedf22e commit e5fea45
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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"}
{"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"}
Original file line number Diff line number Diff line change
@@ -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"}
Original file line number Diff line number Diff line change
@@ -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"}
50 changes: 50 additions & 0 deletions Codeforce/T_Sort_Numbers.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#include <stdio.h>
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;
}
18 changes: 18 additions & 0 deletions Codeforce/U_Float_or_int.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include <stdio.h>
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;
}

0 comments on commit e5fea45

Please sign in to comment.