Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int N, x;
- double num, result=1;
- char oper[100000];
- scanf("%d", &N);
- for(x=0; x<N; x++) {
- scanf("%lf %c", &num, &oper[x]);
- if(oper[x]=='/') {
- result = result/num; }
- else { result = result*num; }}
- printf("%.0lf", result);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement