Permalink
Browse files

Lesson 1 Update

  • Loading branch information...
1 parent 972fcea commit 32aa96e47598b3c643a515a25f29ff30bdaf1773 Vis Viva committed Apr 1, 2012
Showing with 30 additions and 0 deletions.
  1. +30 −0 Lesson_1
View
@@ -0,0 +1,30 @@
+#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);
+
+ cout << "\n ������� �: ";
+ cin >> dX;
+
+ cout << "\n ������� Y: ";
+ cin >> dY;
+
+ cout << "\n ������� Z: ";
+ cin >> dZ;
+
+ cout << "\n �� ����� ��������� �����: X = " << dX << "; Y = " << dY << "; Z = " << dZ;
+
+ dVectorLength = sqrt(dX*dX + dY*dY + dZ*dZ);
+
+ cout << "\n ����� �������: " << dVectorLength << ". \n\n\a";
+
+ return 0;
+}

0 comments on commit 32aa96e

Please sign in to comment.