Initial commit

This commit is contained in:
xixu-me committed 2024-03-17 22:30:49 +08:00
commit bdf71aef37
120 files changed
+8284

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
#include <bits/stdc++.h>
using namespace std;
int main() {
printf("x=");
double x, y;
int type;
scanf("%lf", &x);
type = x < 0;
switch (type) {
case 1:
y = -1;
break;
case 0:
y = 2 * x;
break;
}
printf("f(x)=%f\n", y);
return 0;
}