Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int c,a,b,op,sum=0;
- scanf("%d",&c);
- scanf("%d %c %d",&a,&op,&b);
- switch(op)
- {
- {case'+':
- sum+=a+b;
- break;}
- {case'*':
- sum+=a*b;
- break;}
- }
- if(sum<=c)
- printf("OK\n");
- else
- printf("OVERFLOW\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement