#include<stdio.h>
main()
{ int n,i;
printf(“enter only two digit number”);
for(i=0;;i++)
{ scanf("%2d",&n);
printf(“output=%2d”,n);
if(n==42)
break;
} return 0;
}
You no need to print ‘enter only two…’, ‘output=…’ all these stuff.Your output should match the sample output given.And one more thing ‘if(n==42)’ should be before printf statement.i.e you no need to print 42.You can take a look at my accepted solution :
http://www.codechef.com/viewsolution/4286684