ამ გვერდზე თქვენ იხილავთ გაგზავნილი ამოხსნების სტატუსს.
გაგზავნის თარიღი: 18.06.2022 11:38:06
ამოცანა: მიმატება ან გამოკლება
მომხმარებელი: deme_bz
ვერდიქტი: ამოუხსნელი
შეფასება: 0 ქულა
#inlcude <bits/stdc++.h> using namespace std; int main(){ int v,k; cin >> v >> k; int n; cin >> n; for(int i=1;i<=n;i++){ char x; cin >> x; if(x=='+'){ v+=k; } else{ v-=k; } } cout << v << endl; }
main.cpp:1:2: error: invalid preprocessing directive #inlcude #inlcude <bits/stdc++.h> ^~~~~~~ main.cpp: In function 'int main()': main.cpp:5:5: error: 'cin' was not declared in this scope cin >> v >> k; ^~~ main.cpp:18:5: error: 'cout' was not declared in this scope cout << v << endl; ^~~~ main.cpp:18:18: error: 'endl' was not declared in this scope cout << v << endl; ^~~~