Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<math.h>
- // All unary operators
- int main()
- {
- /* The minus operator changes the sign of its argument.
- A positive number becomes negative,
- and a negative number becomes positive. */
- int a,b,result;
- printf(" Enter value of a: \n");
- scanf("%d",&a);
- result= -a;
- printf("a: %d\n",result);
- printf(" value of b: \n");
- scanf("%d",&b);
- result = +b;//useless huh
- printf("b : %d",result);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement