Permalink
Browse files

Update Lesson_1

  • Loading branch information...
1 parent feaec9a commit 7f75091d24aced689b12cf745385ede4cdafc44f Vis Viva committed Apr 1, 2012
Showing with 7 additions and 18 deletions.
  1. +7 −18 Lesson_1
View
@@ -1,30 +1,19 @@
#include <iostream>
#include <locale>
-using std::cout;
-using std::cin;
-
int main()
{
- setlocale(LC_ALL,"Russian");
-
- double dX(0.0), dY(0.0), dZ(0.0);
- double dVectorLength(0.0);
+ char chLetter('a');
- cout << "\n ������� �: ";
- cin >> dX;
-
- cout << "\n ������� Y: ";
- cin >> dY;
-
- cout << "\n ������� Z: ";
- cin >> dZ;
+ setlocale(LC_ALL,"Russian");
+
+ std::cout << "Введите букву нижнего регистра:\n\n";
- cout << "\n �� ����� ��������� �����: X = " << dX << "; Y = " << dY << "; Z = " << dZ;
+ std::cin >> chLetter;
- dVectorLength = sqrt(dX*dX + dY*dY + dZ*dZ);
+ chLetter = chLetter - 32;
- cout << "\n ����� �������: " << dVectorLength << ". \n\n\a";
+ std::cout << "\nТа же буква в высшем регистре: " << chLetter << ".\n\n";
return 0;
}

0 comments on commit 7f75091

Please sign in to comment.