Escolar Documentos
Profissional Documentos
Cultura Documentos
#include<bits/stdc++.h>
int main()
string s;
getline(cin,s);
int i,n=s.size(),j=0,error;
for(i=0;i<n;i++)
char c=tolower(s[i]);
if(j==0)
if(c=='h')
j++;
else
error=j;
j=14;
else if(j==1)
if(c=='i')
j++;
else
error=j;
j=14;
}
else if(j==2)
if(c=='m')
j++;
else
error=j;
j=14;
else if(j==3)
if(c=='a')
j++;
else
error=j;
j=14;
else if(j==4)
if(c=='n')
j++;
else
error=j;
j=14;
else if(j==5)
{
if(c=='s')
j++;
else
error=j;
j=14;
else if(j==6)
if(c=='h')
j++;
else
error=j;
j=14;
else if(j==7)
if(c=='u')
j++;
else
error=j;
j=14;
else if(j==8)
if(c==' ')
j++;
else
error=j;
j=14;
else if(j==9)
if(c=='j')
j++;
else
error=j;
j=14;
else if(j==10)
if(c=='a')
j++;
else
error=j;
j=14;
else if(j==11)
if(c=='i')
j++;
else
{
error=j;
j=14;
else if(j==12)
if(c=='n')
j++;
else
error=j;
j=14;
else if(j==13)
if(c==' ')
continue;
else
error=j;
j=15;
if(j==13)
cout<<"Compiled :)";
else if(j==15)
{
cout<<"Error at "<<error+1<<"charactrer
"<<error+1<<"charactrer\n";
else
cout<<"Error at "<<error+1<<"charactrer
"<<error+1<<"charactrer\n";
if(correct[error]==' ')
cout<<"\'space\' ";
else
cout<<"\'"<<correct[error]<<"\'"<<"
'"<<" ";
cout<<"there";
return 0;
Output :