Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: VisViva/CPP-Lessons
base: 7f75091d24
...
head fork: VisViva/CPP-Lessons
compare: f75f8df3ce
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 33 additions and 0 deletions.
  1. +33 −0 Lesson_3
View
33 Lesson_3
@@ -0,0 +1,33 @@
+#include <iostream>
+
+int main()
+{
+ std::cout<<"Please input number.\n";
+
+ unsigned short sValueInput, sValueTemp;
+
+ std::cout << "sValue = ";
+ std::cin >> sValueInput;
+
+ sValueTemp = sValueInput;
+
+ sValueTemp <<= 1;
+ std::cout<<"sValue * 2 = "<< sValueTemp <<"\n";
+
+ sValueTemp = sValueInput;
+
+ sValueTemp = sValueTemp + (sValueTemp << 1);
+ std::cout<<"sValue * 3 = "<< sValueTemp <<"\n";
+
+ sValueTemp = sValueInput;
+
+ sValueTemp = sValueTemp << 2;
+ std::cout<<"sValue * 4 = "<< sValueTemp <<"\n";
+
+ sValueTemp = sValueInput;
+
+ sValueTemp = sValueTemp + (sValueTemp << 2);
+ std::cout<<"sValue * 5 = "<< sValueTemp <<"\n";
+
+ return 0;
+}

No commit comments for this range

Something went wrong with that request. Please try again.