I've got problem with this peace of code, it should change lower case letters into upper case, and turn multiple spaces into one space. So what it does wrong, it somehow cuts off the first letter like when i write "abcdefg" it givess me on the output "BCDEFG".
main(){
int z=0,b;
while ( (b = getchar() ) != '\n')
{
b=b-32;
if (b>0)
{
putchar(b);
}
else
{
if (z>=2)
{
putchar(b);
}
else
{
z=z+1;
printf(" ");
}
}
}
}