| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
why why why/#include"stdio.h"
#include"string.h"
main()
{
int i,num,c[11];
char a[3][12]={"too high","too low","right on"},b[12];
scanf("%d",&num);getchar();
while(num!=0)
{
scanf("%[^\n]",b);
while(strcmp(a[2],b)!=0)
{
if(strcmp(a[0],b)==0)
{
for(i=num+1;i<11;i++)
{
c[i]=1;
}
}
if(strcmp(a[1],b)==0)
{
for(i=num-1;i>0;i--)
c[i]=1;
}
scanf("%d",&num);getchar();
scanf("%[^\n]",b);
}
if(c[num]==0)
printf("Stan may be honest\n");
else
printf("Stan is dishonest\n");
for(i=0;i<11;i++)
c[i]=0;
scanf("%d",&num);getchar();
}
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator