# Help me in solving RATINGINPRAC problem

### My issue

include
using namespace std;

int main() {
int n;
scanf(“%d”,&n);
for(int i=1;i<=n;i++)
{
int a,count=0;
scanf(“%d”,&a);
int m[a];
for (int j =0; j<a; j++)
{
scanf(“%d”,&m[j]);
}

``````     for (int j =0; j<a; j++)
{
if(m[j]>m[j+1])
{
count++;
}
}
if(count>0)
{
printf("No\n");
}
else
printf("yes\n");
}
return 0;
``````

}

### My code

``````#include <iostream>
using namespace std;

int main() {
int n;
scanf("%d",&n);
for(int i=1;i<=n;i++)
{
int a,count=0;
scanf("%d",&a);
int m[a];
for (int j =0; j<a; j++)
{
scanf("%d",&m[j]);
}

for (int j =0; j<a; j++)
{
if(m[j]>m[j+1])
{
count++;
}
}
if(count>0)
{
printf("No\n");
}
else
printf("yes\n");
}
return 0;
}

``````

Problem Link: RATINGINPRAC Problem - CodeChef

@eeshsaxena
i have corrected your code .

``````#include <stdio.h>

int main() {
int n;
scanf("%d",&n);
for(int i=1;i<=n;i++)
{
int a,count=0;
scanf("%d",&a);
int m[a];
for (int j =0; j<a; j++)
{
scanf("%d",&m[j]);
}

for (int j =0; j<a-1; j++)
{
if(m[j]>m[j+1])
{
count++;
}
}
if(count>0)
{
printf("No\n");
}
else
printf("Yes\n");
}
return 0;
}``````