Skip to content

Commit 8ab42be

Browse files
added tutorial 8 cpp file from local machine (skipped 2-7)
1 parent 5fff1be commit 8ab42be

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

tut8.cpp

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#include <iostream>
2+
#include <iomanip>
3+
4+
using namespace std;
5+
6+
int main()
7+
{
8+
// int a = 35;
9+
// cout<<"The value of a was: "<<a<<endl;
10+
// a = 48;
11+
// cout<<"The value of a is: "<<a<<endl;
12+
13+
//********Constants********
14+
// here value of a will never change throughout the code
15+
16+
// const int a = 35;
17+
// cout<<"The value of a was: "<<a<<endl;
18+
// a = 48;
19+
// cout<<"The value of a is: "<<a<<endl;
20+
21+
//********Manipulators in C++********
22+
// Helps format display text
23+
24+
// int a = 3, b = 76, c = 1234;
25+
26+
// cout<<"The value of a without setw is: "<<a<<endl;
27+
// cout<<"The value of a without setw is: "<<b<<endl;
28+
// cout<<"The value of a without setw is: "<<c<<endl<<endl;
29+
// // setw-- set width
30+
// cout<<"The value of a with setw is: "<<setw(4)<<a<<endl;
31+
// cout<<"The value of a with setw is: "<<setw(4)<<b<<endl;
32+
// cout<<"The value of a with setw is: "<<setw(4)<<c<<endl;
33+
34+
//********Operater Precedence********
35+
36+
// int a = 3, b = 4;
37+
// int c = ((((a*5)+b)-45)+87);
38+
// cout<<c;
39+
40+
41+
return 0;
42+
}

0 commit comments

Comments
 (0)