T
T
Taras Serevann2016-08-28 10:21:27
C++ / C#
Taras Serevann, 2016-08-28 10:21:27

Why does decreasing the ASCII code by 32 translate into upper case not all Russian letters?

cout << (char) (((int) ch) - 32) << endl;
Works for A, but doesn't work for F anymore. Why?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AtomKrieg, 2016-08-28
@Taras_Serevann

That's why.

for(int i = 128; i < 256; ++i)
cout << i << " : "<< static_cast<unsigned char>(i) << endl;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question