[PDF]

// Program: fahrenheit.C
// Convert temperatures from Celsius to Fahrenheit.
#include <iostream>
int main()
{
// Input
std::cout << "Temperature in degrees Celsius =? ";
int celsius;
std::cin >> celsius;
// Computation and output
std::cout << celsius << " degrees Celsius are "
<< 9 * celsius / 5 + 32 << " degrees Fahrenheit.\n";
return 0;
}
15 degrees Celsius are 59 degrees Fahrenheit.
9 * celsius / 5 + 32
"
$
%&#
#
'" (
9 * celsius / 5 + 32
!
(9 * celsius / 5) + 32
"
$
#
"
)&
(9 * celsius / 5) + 32
((9 * celsius) / 5) + 32
"
$
6&7
$
%&*
./
0
2
/
$
)&
. 3'
/
#
"
+
,-
#
"
+
1
+
3'
/
+
,-
4
#
3 '"
#
5
"
3'
"+
"
#
8
94
"
-3 - 4
#
(
+
/
(-3) - 4
5
:
+
(
/
;
5
4
5
&
9
*
celsius
/
5
+
$
4
9
*
32
4
&
celsius
9 * celsius
9 * celsius
(9 * celsius) / 5
(9 * celsius) / 5
((9 * celsius) / 5) + 32
5
<
5
+
((9 * celsius) / 5) + 32
4
$
4
&8
=
=
=
2
4<
&>
<
?
;
5
4
$
4
(
5
5
@ 33
<
=
1
4
/
'
7
3
7
'
'
#
"
%
%B
%B
'
%
*
,
)
%A
:"
-
)
%A
*
.
)
%A
3
)
%6
'
)
%6
C$'
$'
;
$
(
3
(
&$'
32
:"
*
:"
-
:"
&
*
*
$
'
:"
)
5 / 2
fahrenheit.C:
)
5 / 2
?
9 * celsius / 5 + 32:
15 degrees Celsius are 59 degrees Fahrenheit
&
a
15 degrees Celsius are 47 degrees Fahrenheit
*
*
D
:"
$
'
?
*
)
$
b
&
-5 % 2
'
%
$
'
5 / 2
&
a
'
)
:"
)
?
"
(a / b) * b + a % b
*0
5
-5 / 2
*
:"
5 / 2
"
b
&
*0
$
:"
"
(a / b) * b + a % b
9 / 5 * celsius + 32:
&
"
(a / b) * b + a % b
"
5
-5 / 2
'
6
-5 % 2
%
*
%
5 % 2
&4
D
a
b
E
"
5
@
:
? 0
@ '
:
-?
4
%
4
<
G 5
5
5
+
?4
4
'
# '
:
G 33
33 G
G'
'
'
'G
G'
'
H
/
'
'G
# '
:
@ :
K
?4
4 -
# '
:
33 G
# '
@
# '
:
@ '
:
# '
@
G 33
# ;
;
$'
%
%J
'
'
I $'
%
%B
'
'
I '
%
%J
'
'
I $'
%
%B
'
'
I '
&
"
# '
@
(
# '
@
&
'
expr = expr + 1
F
'
G 5
%
0
G 5 + $' / <
'
&
"
"
"
"
G 5
G 5
+
%
'
0
/ <
G 5
%
G 5 + $' /
<
G 5
G 5 +
<
"
"
"
"
%
'
/
L JE
&
&
MM 33 MM N
ON
E &
&
MM 33 MM N
ON
E &
&
MM
MM N
ON
E
-
P
P
Q
@ -:
@
'
5
5
33 G E
R"
G 33E !
8
S
# '@
K
4
4
5
+
/
# '@ -:
"
'
"
/
+
3L
G %3L G )
G %L G %3 G )
'L
G %'L G )
G %L G %' G )
,L
G %,L G )
G %L G %, G )
-L
G %-L G )
G %L G %- G )
.L
G %.L G )
G %L G %. G )
5
T
'K '$
4
G%
T
int
;
int
// Program: limits.C
// Output the smallest and the largest value of type int.
&
#include <iostream>
#include <limits>
U
')'% ')'%3%S '% D %S )'%'%V
4
5
# 4
& L 6)
int main()
{
std::cout <<
<<
<<
<<
return 0;
}
;
K;
"Minimum int value is "
std::numeric_limits<int>::min() << ".\n"
"Maximum int value is "
std::numeric_limits<int>::max() << ".\n";
Minimum int value is -2147483648
Maximum int value is 2147483647
W
4
7
: T unsigned int
4
+
3 ',/
0
U
D %S )'
%V
4<
?
0
;
power8.C: %XPL '
%J6)DJBBJ%
4< unsigned int
&1u 17u S
power20.C: 6)DL '
PDP%P)PQX
?
H
<
"
o
0
T
unsigned int
= "
+;
K;int
int
unsigned int
17 + 17u
(
<
"
1
2T unsigned int
int'
5
"
unsigned int
G
YD
G
G
MD
G 3)
K
5
'
:
H
=
"
1
2
: :
int a = 3u
"
3u
int +
5
int
E
4
?
/
K
K
"
Z
K
Z
&
)'
IU
D %V
4
&U
D %V
D
%
5
14
15
2
2
G
F:+
G /
D
D
D
D
%
D
%
D
D
%
%
%
K
Z
Z
&
)'
IU
D %V
4
&U
D %V
D
%
14
15
2
2
G
$+
G /
D
D
D
D
%
%
%
D
%
%
%
%
K
Z
K
Z
&
% '
IU
D %V
4& U
D %V
D
%
1
4
1
5
G
F T+
G/
D
2
2
$F T
33
" 4<
K
Z
%
%
F:
G
[ $+
G /
D
D
D
D
%
%
%
D
%
%
%
D
D
[ $+
G /L
Z
F:+ $+
G /F T+F:+
G /
/
/
&K 5
@
4
&K 5
Z
(
%&
4DD%D 4D%DD 4%DDD
&
G
& D%%D
[ $+
G /
D
D
D
D
%
%
%
D
%
%
%
D
[ $L 4D%%D
4DDD% L F:+
G /
G F T+/
/
4DD%D L F:+
G/
/
4D%DD L F:+ F T+
G /
/
4%DDD L F T+ $+
4DDD%
: T bool
&K 5
(
)&
$
5
false
true
4%DDD
4%%D% L $+
$+
4D%DD 4DDD%/
/
4
U
4DDDD L D
V
bool b = true; // Variable mit Wert true
$
(
(
7
+F:/
(
]]
#
)
"
=
0
B
=
F
+ $/
\
\
)
X
+
F T/
H
%
%B
0
7
bool (
+
C$'
C$'
"
%%
I
)
%%
ML
)
%%
IL
)
%%
LL
)
%D
HL
)
%D
'
I bool
/'
I $'
$'
#
)
bool) -> bool
C
$'
(
M
'
I $'
#
#
K
K
$
$
;
7 + x
<
y
=
&&
y
!=
;
3 * z
((7 + x) <
5
&&
?
y) && (y
=
5
||5
&&
4
5
!= (3 * z))
?
||5
4
5
5
5
x != 0 && z / x > y
X
%&
true
&& z / x > y
=
5
=
&&
5
||5
?
&&
4
?
5
||5
4
5
5
5
D&
X
=
false
&& z / x > y
5
&&
||5
?
4
5
5
x != 0 && z / x > y
:"
F H
X
D&
false