Initial commit
This commit is contained in:
commit
bdf71aef37
120 files changed
+8284
No files matched your search
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user