Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- typedef long long LL;
- void fun(int x){
- int y;
- if (x < 0) y = x - 1;
- else if (x == 0) y = 0;
- else if (x < 10) y = 2 * x + 5;
- else y = x + 10;
- printf("%d", y);
- }
- int main()
- {
- int x = 7;
- fun(x);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement