Study results from Stroustrup's PPP3 book.
This commit is contained in:
parent
6363457d0f
commit
7a1093f982
10 changed files with 579 additions and 1 deletions
17
PPP3/ex01.cpp
Normal file
17
PPP3/ex01.cpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
constexpr double pi = 3.14159;
|
||||
double d = 0;
|
||||
while(cin >> d) {
|
||||
int i = d;
|
||||
char c = i;
|
||||
cout << "d==" << d
|
||||
<< " i==" << i
|
||||
<< " c==" << c
|
||||
<< " char(" << c << ")\n";
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue