pages:
  • 1
s.ali.jafari SAYS

sallam chera code man "Runtime Error" mideh? akhe sharte payan kar ba setare ro ham gozashtam.!!!!!! "

include

include <math.h>

include <stdio.h>

using namespace std;

int main() { int n,j,k,l,t,a,b; string p; char s[1000],ss[50]; while(1) { t=0; cin.getline(s,1000); p.append(s); l=p.length(); if(int(s[0])==42)break; k=0; ss[k]=s[0]; for(j=0;j<l;j++) { if(s[j]==' ') { k++; ss[k]=s[j+1]; } } n=0; for(j=0;j<k;j++) { a=int(ss[j]); b=int(ss[j+1]); if(a==b||(a==b+32)||(a+32==b))n=0; else {n=1;t=1;} if(t==1)break; } t=0; if(n==0)cout<<"Y\n"; else cout<<"N\n"; } return 0; }

AMiR SAYS

Please post your code in code format so we can read it. https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code-and-syntax-highlighting

AMiR SAYS

Or use http://scod.ir and provide a link to your code.