Plz send me the code by correcting my code

#include
using namespace std;
#include
int main()
{
int n,m,k,s;
cin>>n>>m>>k>>s;

int sum=s;
char arr[n][m];
for(int i=0;i<n;i++)
for(int j=0;j<m;j++)
cin>>arr[i][j];
for(int i=0;i<n;i++)
{
for(int j=0;j<m;j++)
{
if(j==m)
j=m;
else if(arr[i][j]==’.’){
sum=sum-3;
}

   else if(arr[i][j]=='*'){
    sum=sum+4;}
    else if(arr[i][j]=='#')
    {
    j=m;
    }
}

}

if(sum>=k)
cout<<“Yes”<<endl<<sum;
else
cout<<“No”;
}

public static void maze(char[][] arr, int k, int s) {

    boolean flag = false;
    for (int i = 0; i < arr.length; i++) {
        for (int j = 0; j < arr[0].length; j++) {

            char ch = arr[i][j];

            if (s < k) {
                flag = true;
                break;
            }

            if (ch == '*') {
                s += 5;
            } else if (ch == '.') {
                s -= 2;
            } else {
                break;
            }
            if (j != arr[0].length - 1)
                s--;

        }
    }

    if (!flag) {
        System.out.println("Yes");
      System.out.println(s);
    } else {
        System.out.println("No");
    }

}

}

I’m not correcting your code. This is the code in Java. Try to understand it and fix your code once. It’s better that way. If you still can’t after a few tries then I’ll be happy to help you.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.