Language: C++

#include<stdio.h>
#include<string.h>
int main()
{
????????char str[10000] = { 0 }, str2[10000];
????????int i, m, n, j, joi, ioi;
????????while (scanf("%s", str) != EOF){
????????????????joi = 0;
????????????????ioi = 0;
????????????????n = strlen(str);
????????????????for (i = 0; i < n; i++) {
????????????????????????if (str[i] == 'J'&&str[i + 1] == 'O'&&str[i + 2] == 'I') {
????????????????????????????????joi++;
????????????????????????}
????????????????????????if (str[i] == 'I'&&str[i + 1] == 'O'&&str[i + 2] == 'I') {
????????????????????????????????ioi++;
????????????????????????}
????????????????}
????????????????printf("%d\n%d\n", joi,ioi);
????????}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: expected primary-expression before '?' token
    5 | ????????char str[10000] = { 0 }, str2[10000];
      | ^
a.cc:5:2: error: expected primary-expression before '?' token
    5 | ????????char str[10000] = { 0 }, str2[10000];
      |  ^
a.cc:5:3: error: expected primary-expression before '?' token
    5 | ????????char str[10000] = { 0 }, str2[10000];
      |   ^
a.cc:5:4: error: expected primary-expression before '?' token
    5 | ????????char str[10000] = { 0 }, str2[10000];
      |    ^
a.cc:5:5: error: expected primary-expression before '?' token
    5 | ????????char str[10000] = { 0 }, str2[10000];
      |     ^
a.cc:5:6: error: expected primary-expression before '?' token
    5 | ????????char str[10000] = { 0 }, str2[10000];
      |      ^
a.cc:5:7: error: expected primary-expression before '?' token
    5 | ????????char str[10000] = { 0 }, str2[10000];
      |       ^
a.cc:5:8: error: expected primary-expression before '?' token
    5 | ????????char str[10000] = { 0 }, str2[10000];
      |        ^
a.cc:5:9: error: expected primary-expression before 'char'
    5 | ????????char str[10000] = { 0 }, str2[10000];
      |         ^~~~
a.cc:5:9: error: expected ':' before 'char'
    5 | ????????char str[10000] = { 0 }, str2[10000];
      |         ^~~~
      |         :
a.cc:5:9: error: expected primary-expression before 'char'
    5 | ????????char str[10000] = { 0 }, str2[10000];
      |         ^~~~
a.cc:5:9: error: expected ':' before 'char'
    5 | ????????char str[10000] = { 0 }, str2[10000];
      |         ^~~~
      |         :
a.cc:5:9: error: expected primary-expression before 'char'
    5 | ????????char str[10000] = { 0 }, str2[10000];
      |         ^~~~
a.cc:5:9: error: expected ':' before 'char'
    5 | ????????char str[10000] = { 0 }, str2[10000];
      |         ^~~~
      |         :
a.cc:5:9: error: expected primary-expression before 'char'
    5 | ????????char str[10000] = { 0 }, str2[10000];
      |         ^~~~
a.cc:5:9: error: expected ':' before 'char'
    5 | ????????char str[10000] = { 0 }, str2[10000];
      |         ^~~~
      |         :
a.cc:5:9: error: expected primary-expression before 'char'
    5 | ????????char str[10000] = { 0 }, str2[10000];
      |         ^~~~
a.cc:5:9: error: expected ':' before 'char'
    5 | ????????char str[10000] = { 0 }, str2[10000];
      |         ^~~~
      |         :
a.cc:5:9: error: expected primary-expression before 'char'
    5 | ????????char str[10000] = { 0 }, str2[10000];
      |         ^~~~
a.cc:5:9: error: expected ':' before 'char'
    5 | ????????char str[10000] = { 0 }, str2[10000];
      |         ^~~~
      |         :
a.cc:5:9: error: expected primary-expression before 'char'
    5 | ????????char str[10000] = { 0 }, str2[10000];
      |         ^~~~
a.cc:5:9: error: expected ':' before 'char'
    5 | ????????char str[10000] = { 0 }, str2[10000];
      |         ^~~~
      |         :
a.cc:5:9: error: expected primary-expression before 'char'
    5 | ????????char str[10000] = { 0 }, str2[10000];
      |         ^~~~
a.cc:5:9: error: expected ':' before 'char'
    5 | ????????char str[10000] = { 0 }, str2[10000];
      |         ^~~~
      |         :
a.cc:5:9: error: expected primary-expression before 'char'
    5 | ????????char str[10000] = { 0 }, str2[10000];
      |         ^~~~
a.cc:5:32: error: expected primary-expression before ',' token
    5 | ????????char str[10000] = { 0 }, str2[10000];
      |                                ^
a.cc:5:34: error: 'str2' was not declared in this scope
    5 | ????????char str[10000] = { 0 }, str2[10000];
      |                                  ^~~~
a.cc:6:1: error: expected primary-expression before '?' token
    6 | ????????int i, m, n, j, joi, ioi;
      | ^
a.cc:6:2: error: expected primary-expression before '?' token
    6 | ????????int i, m, n, j, joi, ioi;
      |  ^
a.cc:6:3: error: expected primary-expression before '?' token
    6 | ????????int i, m, n, j, joi, ioi;
      |   ^
a.cc:6:4: error: expected primary-expression before '?' token
    6 | ????????int i, m, n, j, joi, ioi;
      |    ^
a.cc:6:5: error: expected primary-expression before '?' token
    6 | ????????int i, m, n, j, joi, ioi;
      |     ^
a.cc:6:6: error: expected primary-expression before '?' token
    6 | ????????int i, m, n, j, joi, ioi;
      |      ^
a.cc:6:7: error: expected primary-expression before '?' token
    6 | ????????int i, m, n, j, joi, ioi;
      |       ^
a.cc:6:8: error: expected primary-expression before '?' token
    6 | ????????int i, m, n, j, joi, ioi;
      |        ^
a.cc:6:9: error: expected primary-expression before 'int'
    6 | ????????int i, m, n, j, joi, ioi;
      |         ^~~
a.cc:6:9: error: expected ':' before 'int'
    6 | ????????int i, m, n, j, joi, ioi;
      |         ^~~
      |         :
a.cc:6:9: error: expected primary-expression before 'int'
    6 | ????????int i, m, n, j, joi, ioi;
      |         ^~~
a.cc:6:9: error: expected ':' before 'int'
    6 | ????????int i, m, n, j, joi, ioi;
      |         ^~~
      |         :
a.cc:6:9: error: expected primary-expression before 'int'
    6 | ????????int i, m, n, j, joi, ioi;
      |         ^~~
a.cc:6:9: error: expected ':' before 'int'
    6 | ????????int i, m, n, j, joi, ioi;
      |         ^~~
      |         :
a.cc:6:9: error: expected primary-expression before 'int'
    6 | ????????int i, m, n, j, joi, ioi;
      |         ^~~
a.cc:6:9: error: expected ':' before 'int'
    6 | ????????int i, m, n, j, joi, ioi;
      |         ^~~
      |         :
a.cc:6:9: error: expected primary-expression before 'int'
    6 | ????????int i, m, n, j, joi, ioi;
      |         ^~~
a.cc:6:9: error: expected ':' before 'int'
    6 | ????????int i, m, n, j, joi, ioi;
      |         ^~~
      |         :
a.cc:6:9: error: expected primary-expression before 'int'
    6 | ????????int i, m, n, j, joi, ioi;
      |         ^~~
a.cc:6:9: error: expected ':' before 'int'
    6 | ????????int i, m, n, j, joi, ioi;
      |         ^~~
      |         :
a.cc:6:9: error: expected primary-expression before 'int'
    6 | ????????int i, m, n, j, joi, ioi;
      |         ^~~
a.cc:6:9: error: expected ':' before 'int'
    6 | ????????int i, m, n, j, joi, ioi;
      |         ^~~
      |         :
a.cc:6:9: error: expected primary-expression before 'int'
    6 | ????????int i, m, n, j, joi, ioi;
      |         ^~~
a.cc:6:9: error: expected ':' before 'int'
    6 | ????????int i, m, n, j, joi, ioi;
      |         ^~~
      |         :
a.cc:6:9: error: expected primary-expression before 'int'
    6 | ????????int i, m, n, j, joi, ioi;
      |         ^~~
a.cc:7:1: error: expected primary-expression before '?' token
    7 | ????????while (scanf("%s", str) != EOF){
      | ^
a.cc:7:2: error: expected primary-expression before '?' token
    7 | ????????while (scanf("%s", str) != EOF){
      |  ^
a.cc:7:3: error: expected primary-expression before '?' token
    7 | ????????while (scanf("%s", str) != EOF){
      |   ^
a.cc:7:4: error: expected primary-expression before '?' token
    7 | ????????while (scanf("%s", str) != EOF){
      |    ^
a.cc:7:5: error: expected primary-expression before '?' token
    7 | ????????while (scanf("%s", str) != EOF){
      |     ^
a.cc:7:6: error: expected primary-expression before '?' token
    7 | ????????while (scanf("%s", str) != EOF){
      |      ^
a.cc:7:7: error: expected primary-expression before '?' token
    7 | ????????while (scanf("%s", str) != EOF){
      |       ^
a.cc:7:8: error: expected primary-expression before '?' token
    7 | ????????while (scanf("%s", str) != EOF){
      |        ^
a.cc:7:9: error: expected primary-expression before 'while'
    7 | ????????while (scanf("%s", str) != EOF){
      |         ^~~~~
a.cc:7:9: error: expected ':' before 'while'
    7 | ????????while (scanf("%s", str) != EOF){
      |         ^~~~~
      |         :
a.cc:7:9: error: expected primary-expression before 'while'
    7 | ????????while (scanf("%s", str) != EOF){
      |         ^~~~~
a.cc:7:9: error: expected ':' before 'while'
    7 | ????????while (scanf("%s", str) != EOF){
      |         ^~~~~
      |         :
a.cc:7:9: error: expected primary-expression before 'while'
    7 | ????????while (scanf("%s", str) != EOF){
      |         ^~~~~
a.cc:7:9: error: expected ':' before 'while'
    7 | ????????while (scanf("%s", str) != EOF){
      |         ^~~~~
      |         :
a.cc:7:9: error: expected primary-expression before 'while'
    7 | ????????while (scanf("%s", str) != EOF){
      |         ^~~~~
a.cc:7:9: error: expected ':' before 'while'
    7 | ????????while (scanf("%s", str) != EOF){
      |         ^~~~~
      |         :
a.cc:7:9: error: expected primary-expression before 'while'
    7 | ????????while (scanf("%s", str) != EOF){
      |         ^~~~~
a.cc:7:9: error: expected ':' before 'while'
    7 | ????????while (scanf("%s", str) != EOF){
      |         ^~~~~
      |         :
a.cc:7:9: error: expected primary-expression before 'while'
    7 | ????????while (scanf("%s", str) != EOF){
      |         ^~~~~
a.cc:7:9: error: expected ':' before 'while'
    7 | ????????while (scanf("%s", str) != EOF){
      |         ^~~~~
      |         :
a.cc:7:9: error: expected primary-expression before 'while'
    7 | ????????while (scanf("%s", str) != EOF){
      |         ^~~~~
a.cc:7:9: error: expected ':' before 'while'
    7 | ????????while (scanf("%s", str) != EOF){
      |         ^~~~~
      |         :
a.cc:7:9: error: expected primary-expression before 'while'
    7 | ????????while (scanf("%s", str) != EOF){
      |         ^~~~~
a.cc:7:9: error: expected ':' before 'while'
    7 | ????????while (scanf("%s", str) != EOF){
      |         ^~~~~
      |         :
a.cc:7:9: error: expected primary-expression before 'while'
    7 | ????????while (scanf("%s", str) != EOF){
      |         ^~~~~