#include <iostream.h>
int main(void){
char a;
char b;
cim >> b;
b=b-'a'+'A';
cout << b;
return 0;
}
I am like about 2 weeks into programming, so I am pretty simplistic in my programs. If you put that into like a Borland Compiler (not sure if other compilers use exact same format) it will change a lower case letter into an upper case letter. That part I have down through a lot of work (lot of work for me b/c I am not really that good at programming). I want to make it so my program can keep going after one.
Basically, right now, I type in a lower case letter after running the program and it becomes upper case. I want it so that after I get an uppercase letter, I can go to a new line and type another lowercase letter which will become uppercase. I do not want to need to re-run the program. I want to be able to type like "a" and get "A" and then automatically get sent to the next line so I can type like "x" and then get "X". The program always terminates after it converts I letter. I am currently like testing while loop restrictions to get it to work, but i have been overall unsuccessful. Also, I want it to terminate if I don't type in a character. Thanks for your help. I have looked at codes that convert letters, but they are very advanced. My code gets the job done, but is very short b/c I can't really do it any other way.