Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <stdint.h>
  2. #include <stdio.h>
  3.  
  4. uint8_t u8Minuend;
  5. int8_t i8Subtrahend;
  6.  
  7. void main(void)
  8. {
  9. int8_t i8Result = 150;
  10. u8Minuend = 250;
  11. i8Subtrahend = 100;
  12.  
  13. i8Result = (u8Minuend > i8Subtrahend) ? (int8_t)(u8Minuend - i8Subtrahend) : i8Result;
  14.  
  15. printf("The operation result is %d. \r \n", i8Result);
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement