Skip to content

Commit f3c7d95

Browse files
committed
added listing tags to 3.1
1 parent a77e91b commit f3c7d95

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

source/ch3_javadatatypes.ptx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@
9595
If this program were run on the command-line, you would enter the temperature when prompted – the Javascript pop-up for input is only an artifact of the digital textbook.
9696
</p>
9797

98-
99-
<program xml:id="python-temperature-conversion" interactive="activecode" language="python">
98+
<listing xml:id="python-temperature-conversion">
99+
<program interactive="activecode" language="python">
100100
<code>
101101
def main():
102102
fahr = int(input("Enter the temperature in F: "))
@@ -105,13 +105,15 @@ def main():
105105
main()
106106
</code> <tests> </tests>
107107
</program>
108+
</listing>
108109

109110
<p>
110111
Next, lets look at the Java equivalent. If this program were run on the command-line, you would enter the temperature when prompted &#x2013; the &#x201C;Input for Program&#x201D; text box is only an artifact of the digital textbook.
111112
</p>
112113

113114

114-
<program xml:id="java-temperature-conversion" interactive="activecode" language="java">
115+
<listing xml:id="java-temperature-conversion">
116+
<program interactive="activecode" language="java">
115117
<code>
116118
import java.util.Scanner;
117119
public class TempConv {
@@ -128,7 +130,8 @@ public class TempConv {
128130
}
129131
</code> <stdin> </stdin> <tests> </tests>
130132
</program>
131-
133+
</listing>
134+
132135
<p>
133136
There are several new concepts introduced in this example. We will look at them in the following order:
134137
</p>

0 commit comments

Comments
 (0)