eolymp
bolt
Try our new interface for solving problems
Problems

Arithmetic

published at 10/11/12, 3:45:55 pm

i want sloutions...

published at 1/17/24, 6:36:47 pm

include <bits/stdc++.h>

define ll long long

define ld long double

using namespace std; int main(){

ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
ll n;
cin>>n;
char k;
ll ans = n;
while(cin>>k>>n){
    if(k == '*'){
        ans*=n;
    }
    else if(k == '+'){
        ans+=n;
    }
    else{
        ans/=n;
    }
}
cout<<ans;

} //TECHNOBLADE NEVER DIES