Initial commit
This commit is contained in:
commit
bdf71aef37
120 files changed
+8284
No files matched your search
@@ -0,0 +1,25 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
printf("x=");
|
||||
|
||||
double x, y;
|
||||
|
||||
scanf("%lf", &x);
|
||||
|
||||
if (x > 0) {
|
||||
y = 2 * x;
|
||||
}
|
||||
else if (x == 0) {
|
||||
y = 0;
|
||||
}
|
||||
else {
|
||||
y = -1;
|
||||
}
|
||||
|
||||
printf("f(x)=%f\n", y);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user