62662023-11-10 20:17:13horkaBevásárláscpp17Compilation error
#include <bits/stdc++.h>
using namespace std;

int main()
{
    int a,b,c; cin>>a>>b>>c;
    int sum=0,vett=0;
    sum+=min(300*10,300*a);
    vett+=min(10,a);
    if(vett<10) {sum+=min((10-vett)*350,b*350) vett+=min(10-vett,b);}
    if(vett<10) sum+=min((10-vett)*400,c*400);
    cout<<(a+b+c>=10?sum:-1)<<endl;
}
Compilation error
exit status 1
main.cpp: In function 'int main()':
main.cpp:10:47: error: expected ';' before 'vett'
   10 |     if(vett<10) {sum+=min((10-vett)*350,b*350) vett+=min(10-vett,b);}
      |                                               ^~~~~
      |                                               ;
Exited with error status 1