Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created August 7, 2021 07:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/decbc9428e1725ac30ad156a1faf185f to your computer and use it in GitHub Desktop.
Save amankharwal/decbc9428e1725ac30ad156a1faf185f to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
int main(){
int counter;
char letter;
cout<<"Enter any letter : ";
cin>>letter;
counter = letter;
if (counter >= 65 && counter <=90){
counter = counter + 32;
letter = counter;
cout<<letter;
}
else if (counter >= 96 && counter <= 122){
counter = counter - 32;
letter = counter;
cout<<letter;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment