-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtut14.cpp
79 lines (71 loc) · 1.78 KB
/
tut14.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//--------->use of constants/*
/*#include<iostream>
using namespace std;
int main(){
const int a=45;
const char c='d';
cout<<"the value of a is " <<c;
cout<<"the value of c is " <<a;
return 0;
}*/
//----------->use of manipuators(endl,setw)
/*#include<iostream>
#include<iomanip>
using namespace std;
int main(){
int a=4,b=45489,c=3544544;
cout<<"the value of a is " <<setw(3)<<a<<endl;
cout<<"the value of b is " <<setw(3)<<b<<endl;
cout<<"the value of c is " <<setw(3)<<c<<endl;
cout<<endl;
cout<<"the value of a is "<<a<<endl;
cout<<"the value of b is "<<b<<endl;
cout<<"the value of c is "<<c<<endl;
return 0;
}*/
/*#include<iostream>
#include<iomanip>
using namespace std;
int main(){
int a=458,b=1354165,c=644444;
cout<<"the value of a is "<<setw(5)<<a<<endl;
cout<<"the value of b is "<<setw(5)<<b<<endl;
cout<<"the value of c is "<<setw(5)<<c<<endl;
cout<<endl;
cout<<"the value of a is "<<a<<endl;
cout<<"the value of a is "<<b<<endl;
cout<<"the value of a is "<<c<<endl;
return 0;
}*/
/*#include<iostream>
#include<iomanip>
using namespace std;
int main(){
int a=4545;
int b=32165351;
int c=5454454;
cout<<"the value of a is " <<setw(9)<<a<<endl;
cout<<"the value of b is " <<setw(9)<<b<<endl;
cout<<"the value of c is " <<setw(9)<<c<<endl;
cout<<endl;
cout<<"the value of a is " <<a<<endl;
cout<<"the value of b is " <<b<<endl;
cout<<"the value of c is " <<c<<endl;
return 0;
}*/
/*#include<iostream>
#include<iomanip>
using namespace std;
int main(){
int a=4578;
int b=3652;
int c=36987454;
cout<<setw(4)<<a<<endl;
cout<<setw(4)<<b<<endl;
cout<<setw(4)<<c<<endl;
cout<<endl;
cout<<a<<endl;
cout<<b<<endl;
cout<<c<<endl;
return 0;
}*/