Hello, guys.
I have a problem with this code:
It's not working.Code:/* Write a program “CASE” which reads an upper case character from the keyboard and prints it out in lower case. */ #include <stdio.h> void main () { char upperCase, lowerCase; printf("This program changes and upper case character into a lower case character.\n"); do scanf("%c", &upperCase); if (upperCase < 65 || upperCase > 90) printf("The entered value is not an upper case character. Please, enter another value."); while (upperCase < 65 || upperCase > 90); lowerCase = upperCase + 32; printf ("Result => %c", lowerCase); }
This is the error I'm getting:
Any idea what's the problem? I have no idea.main.c: In function 'main': main.c:18:9: error: expected 'while' before 'if' if (upperCase < 65 || upperCase > 90) ^~
exit status 1
Thanks in advanced.