Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdint.h>
- #include <stdlib.h>
- #include <stdio.h>
- int main(const int argc, const char * argv[]){
- int32_t x, y;
- if (argc < 3){
- fprintf(stderr,"Usage: %s num1 num2\n",argv[0]);
- exit(1);
- }
- x = atoi(argv[1]);
- y = atoi(argv[2]);
- if (y <= 0){
- return 0;
- }
- if (x + y < x){
- printf("Overflow happens!\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement