Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
501 B
2
Indexable
Never
/*assignment: 1
  author: Alex korzh, ID:
  */

#include <iostream>
using namespace std;
int main()
{
	char TAV;
	int Assci;
	cout<<"Enter your char:\n";
	cin>>TAV;
	Assci = (int)TAV;
	if (TAV > 64 && TAV < 91 || TAV>96 && TAV < 123)
	{
		if (Assci > 64 && Assci < 123)
		{
			if (TAV < 91)
			{
				Assci = Assci + 32;
				cout<<"the char is:"<<(char)Assci;
			}

		}
		if (TAV >= 90)
		{
			Assci = TAV - 32;
			cout<<"the char is:"<<(char)Assci;
		}
	}

	else
		cout<<"the char is:"<<(char)Assci;
}