[LON-CAPA-users] Help with formatting
Guy Albertelli II
lon-capa-users@mail.lon-capa.org
Thu, 30 Oct 2003 11:21:48 -0500 (EST)
Hi Felicia,
> I'm trying to help a school teacher format his problem such that it
> displays like this:
>
> 4.54
> 34.4
> .456
> + 123.2
> -------
Two ideas
<pre>
4.54
34.4
.456
+ 123.2
-------
</pre>
You can use sprintf to properly format things.
Or
<table>
<tr><td align="right">4</td><td>.</td><td align="left">54</td></tr>
...
You can use perl to divide the number up and display it this way.
Let me know if you need full working code.
--
guy@albertelli.com LON-CAPA Developer 0-7-5-5-