/in/foo.cc:2:2: error: 'cin' does not name a type
cin >> n;
^~~
/in/foo.cc:4:2: error: expected unqualified-id before 'for'
for (int i = 0; i < n; i++)
^~~
/in/foo.cc:4:18: error: 'i' does not name a type
for (int i = 0; i < n; i++)
^
/in/foo.cc:4:25: error: 'i' does not name a type
for (int i = 0; i < n; i++)
^
/in/foo.cc:10:2: error: expected unqualified-id before 'for'
for (int i = 0; i < n; i++)
^~~
/in/foo.cc:10:18: error: 'i' does not name a type
for (int i = 0; i < n; i++)
^
/in/foo.cc:10:25: error: 'i' does not name a type
for (int i = 0; i < n; i++)
^
/in/foo.cc:14:2: error: expected unqualified-id before 'for'
for (int i = 0; i < n; i++)
^~~
/in/foo.cc:14:18: error: 'i' does not name a type
for (int i = 0; i < n; i++)
^
/in/foo.cc:14:25: error: 'i' does not name a type
for (int i = 0; i < n; i++)
^
/in/foo.cc:26:2: error: expected unqualified-id before 'for'
for (int i = 0; i < n; i++)
^~~
/in/foo.cc:26:18: error: 'i' does not name a type
for (int i = 0; i < n; i++)
^
/in/foo.cc:26:25: error: 'i' does not name a type
for (int i = 0; i < n; i++)
^
/in/foo.cc:41:2: error: expected unqualified-id before 'for'
for (int i = 0; i < n; i++)
^~~
/in/foo.cc:41:18: error: 'i' does not name a type
for (int i = 0; i < n; i++)
^
/in/foo.cc:41:25: error: 'i' does not name a type
for (int i = 0; i < n; i++)
^
/in/foo.cc:76:2: error: 'cout' does not name a type
cout << result << endl;
^~~~