3832021-11-03 08:20:37DomiKuiToronyépítés (1,1,3,3)cpp11Forditási hiba
// torony1133.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
#include <vector>
#include <stack>
#include <algorithm>
using namespace std;
	

int main()
{
	int magassag;
	cin >> magassag;
	vector<int> lista(magassag);

	lista[0] = 2;
	lista[1] = 4;
	lista[2] = 10;
	for (int i = 3; i < magassag; i++)
	{
		lista[i] = 2 * lista[i - 1] + 2*lista[i - 3]%20210108;

	}
	int válasz = lista[magassag-1];
	cout << válasz;
}
Forditási hiba
exit status 1main.cpp:25:7: error: stray ‘\341’ in program
   25 |  int v�lasz = lista[magassag-1];
      |       ^
main.cpp:26:11: error: stray ‘\341’ in program
   26 |  cout << v�lasz;
      |           ^
main.cpp: In function ‘int main()’:
main.cpp:25:8: error: expected initializer before ‘lasz’
   25 |  int v�lasz = lista[magassag-1];
      |        ^~~~
main.cpp:26:10: error: ‘v’ was not declared in this scope
   26 |  cout << v�lasz;
      |          ^
Exited with error status 1