Untitled
Anonymous
plain_text
11/22/2022 6:58 PM
276 B
12
Indexable
#include <iostream>
using namespace std;
int main(){
int a, b, c, t;
cin >> a >> b >> c >> t;
int s = 0;
if (t <= a){
cout << t * b;
}
else{
s = a * b + (t - a) * c;
cout << s;
}
}Editor is loading...