Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
	string a;
	int i,ioi,joi;
while(cin >> s, !cin.eof()) {
????????joi = 0;
????????ioi = 0;
????????for(i=0;i<s.size()-2;i++) {
????????????????if(a[i]=='J') {
????????????????????????if(a[i+1]=='O') {
????????????????????????????????if(a[i+2]=='I') {
????????????????????????????????????????joi++;
????????????????????????????????????????i += 1;
????????????????????????????????}
????????????????????????}
????????????????}
??????????????????????if(a[i]=='I') {
????????????????????????if(a[i+1]=='O') {
????????????????????????????????if(a[i+2]=='I') {
????????????????????????????????????????ioi++;
????????????????????????????????????????i += 1;
????????????????????????????????}
????????????????????????}
????????????????}
????????}??
	cout<<joi << endl;
	cout<<ioi << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: 's' was not declared in this scope
    7 | while(cin >> s, !cin.eof()) {
      |              ^
a.cc:8:1: error: expected primary-expression before '?' token
    8 | ????????joi = 0;
      | ^
a.cc:8:2: error: expected primary-expression before '?' token
    8 | ????????joi = 0;
      |  ^
a.cc:8:3: error: expected primary-expression before '?' token
    8 | ????????joi = 0;
      |   ^
a.cc:8:4: error: expected primary-expression before '?' token
    8 | ????????joi = 0;
      |    ^
a.cc:8:5: error: expected primary-expression before '?' token
    8 | ????????joi = 0;
      |     ^
a.cc:8:6: error: expected primary-expression before '?' token
    8 | ????????joi = 0;
      |      ^
a.cc:8:7: error: expected primary-expression before '?' token
    8 | ????????joi = 0;
      |       ^
a.cc:8:8: error: expected primary-expression before '?' token
    8 | ????????joi = 0;
      |        ^
a.cc:8:16: error: expected ':' before ';' token
    8 | ????????joi = 0;
      |                ^
      |                :
a.cc:8:16: error: expected primary-expression before ';' token
a.cc:8:16: error: expected ':' before ';' token
    8 | ????????joi = 0;
      |                ^
      |                :
a.cc:8:16: error: expected primary-expression before ';' token
a.cc:8:16: error: expected ':' before ';' token
    8 | ????????joi = 0;
      |                ^
      |                :
a.cc:8:16: error: expected primary-expression before ';' token
a.cc:8:16: error: expected ':' before ';' token
    8 | ????????joi = 0;
      |                ^
      |                :
a.cc:8:16: error: expected primary-expression before ';' token
a.cc:8:16: error: expected ':' before ';' token
    8 | ????????joi = 0;
      |                ^
      |                :
a.cc:8:16: error: expected primary-expression before ';' token
a.cc:8:16: error: expected ':' before ';' token
    8 | ????????joi = 0;
      |                ^
      |                :
a.cc:8:16: error: expected primary-expression before ';' token
a.cc:8:16: error: expected ':' before ';' token
    8 | ????????joi = 0;
      |                ^
      |                :
a.cc:8:16: error: expected primary-expression before ';' token
a.cc:8:16: error: expected ':' before ';' token
    8 | ????????joi = 0;
      |                ^
      |                :
a.cc:8:16: error: expected primary-expression before ';' token
a.cc:9:1: error: expected primary-expression before '?' token
    9 | ????????ioi = 0;
      | ^
a.cc:9:2: error: expected primary-expression before '?' token
    9 | ????????ioi = 0;
      |  ^
a.cc:9:3: error: expected primary-expression before '?' token
    9 | ????????ioi = 0;
      |   ^
a.cc:9:4: error: expected primary-expression before '?' token
    9 | ????????ioi = 0;
      |    ^
a.cc:9:5: error: expected primary-expression before '?' token
    9 | ????????ioi = 0;
      |     ^
a.cc:9:6: error: expected primary-expression before '?' token
    9 | ????????ioi = 0;
      |      ^
a.cc:9:7: error: expected primary-expression before '?' token
    9 | ????????ioi = 0;
      |       ^
a.cc:9:8: error: expected primary-expression before '?' token
    9 | ????????ioi = 0;
      |        ^
a.cc:9:16: error: expected ':' before ';' token
    9 | ????????ioi = 0;
      |                ^
      |                :
a.cc:9:16: error: expected primary-expression before ';' token
a.cc:9:16: error: expected ':' before ';' token
    9 | ????????ioi = 0;
      |                ^
      |                :
a.cc:9:16: error: expected primary-expression before ';' token
a.cc:9:16: error: expected ':' before ';' token
    9 | ????????ioi = 0;
      |                ^
      |                :
a.cc:9:16: error: expected primary-expression before ';' token
a.cc:9:16: error: expected ':' before ';' token
    9 | ????????ioi = 0;
      |                ^
      |                :
a.cc:9:16: error: expected primary-expression before ';' token
a.cc:9:16: error: expected ':' before ';' token
    9 | ????????ioi = 0;
      |                ^
      |                :
a.cc:9:16: error: expected primary-expression before ';' token
a.cc:9:16: error: expected ':' before ';' token
    9 | ????????ioi = 0;
      |                ^
      |                :
a.cc:9:16: error: expected primary-expression before ';' token
a.cc:9:16: error: expected ':' before ';' token
    9 | ????????ioi = 0;
      |                ^
      |                :
a.cc:9:16: error: expected primary-expression before ';' token
a.cc:9:16: error: expected ':' before ';' token
    9 | ????????ioi = 0;
      |                ^
      |                :
a.cc:9:16: error: expected primary-expression before ';' token
a.cc:10:1: error: expected primary-expression before '?' token
   10 | ????????for(i=0;i<s.size()-2;i++) {
      | ^
a.cc:10:2: error: expected primary-expression before '?' token
   10 | ????????for(i=0;i<s.size()-2;i++) {
      |  ^
a.cc:10:3: error: expected primary-expression before '?' token
   10 | ????????for(i=0;i<s.size()-2;i++) {
      |   ^
a.cc:10:4: error: expected primary-expression before '?' token
   10 | ????????for(i=0;i<s.size()-2;i++) {
      |    ^
a.cc:10:5: error: expected primary-expression before '?' token
   10 | ????????for(i=0;i<s.size()-2;i++) {
      |     ^
a.cc:10:6: error: expected primary-expression before '?' token
   10 | ????????for(i=0;i<s.size()-2;i++) {
      |      ^
a.cc:10:7: error: expected primary-expression before '?' token
   10 | ????????for(i=0;i<s.size()-2;i++) {
      |       ^
a.cc:10:8: error: expected primary-expression before '?' token
   10 | ????????for(i=0;i<s.size()-2;i++) {
      |        ^
a.cc:10:9: error: expected primary-expression before 'for'
   10 | ????????for(i=0;i<s.size()-2;i++) {
      |         ^~~
a.cc:10:9: error: expected ':' before 'for'
   10 | ????????for(i=0;i<s.size()-2;i++) {
      |         ^~~
      |         :
a.cc:10:9: error: expected primary-expression before 'for'
   10 | ????????for(i=0;i<s.size()-2;i++) {
      |         ^~~
a.cc:10:9: error: expected ':' before 'for'
   10 | ????????for(i=0;i<s.size()-2;i++) {
      |         ^~~
      |         :
a.cc:10:9: error: expected primary-expression before 'for'
   10 | ????????for(i=0;i<s.size()-2;i++) {
      |         ^~~
a.cc:10:9: error: expected ':' before 'for'
   10 | ????????for(i=0;i<s.size()-2;i++) {
      |         ^~~
      |         :
a.cc:10:9: error: expected primary-expression before 'for'
   10 | ????????for(i=0;i<s.size()-2;i++) {
      |         ^~~
a.cc:10:9: error: expected ':' before 'for'
   10 | ????????for(i=0;i<s.size()-2;i++) {
      |         ^~~
      |         :
a.cc:10:9: error: expected primary-expression before 'for'
   10 | ????????for(i=0;i<s.size()-2;i++) {
      |         ^~~
a.cc:10:9: error: expected ':' before 'for'
   10 | ????????for(i=0;i<s.size()-2;i++) {
      |         ^~~
      |         :
a.cc:10:9: error: expected primary-expression before 'for'
   10 | ????????for(i=0;i<s.size()-2;i++) {
      |         ^~~
a.cc:10:9: error: expected ':' before 'for'
   10 | ????????for(i=0;i<s.size()-2;i++) {
      |         ^~~
      |         :
a.cc:10:9: error: expected primary-expression before 'for'
   10 | ????????for(i=0;i<s.size()-2;i++) {
      |         ^~~
a.cc:10:9: error: expected ':' before 'for'
   10 | ????????for(i=0;i<s.size()-2;i++) {
      |         ^~~
      |         :
a.cc:10:9: error: expected primary-expression before 'for'
   10 | ????????for(i=0;i<s.size()-2;i++) {
      |         ^~~
a.cc:10:9: error: expected ':' before 'for'
   10 | ????????for(i=0;i<s.size()-2;i++) {
      |         ^~~
      |         :
a.cc:10:9: error: expected primary-expression before 'for'
   10 | ????????for(i=0;i<s.size()-2;i++) {
      |         ^~~
a.cc:10:33: error: expected ';' before ')' token
   10 | ????????for(i=0;i<s.size()-2;i++) {
      |                                 ^
      |                                 ;
a.cc:27:10: error: expected primary-expression before '?' token
   27 | ????????}??
      |          ^
a.cc:27:11: error: expected primary-expression before '?' token
   27 | ????????}??
      |           ^
a.cc:28:26: error: expected ':' before ';' token
   28 |         cout<<joi << endl;
      |                          ^
      |                          :
a.cc:28:26: error: expected primary-expression before ';' token
a.cc:28:26: error: expected ':' before ';' token
   28 |         cout<<joi << endl;
      |                          ^
      |                          :
a.cc:28:26: error: expected primary-expression before ';' token