U
Uno
$ indent -i3 judy1.c
$ gcc judy1.c -o out
$ ./out
The tax rate at Lowe's on Paseo is 7.001474e-02 per cent.
You owe me exactly $1.565919e+01 for the outdoor light.
$ echo "That's $15.66."
That's 5.66.
$ cat judy1.c
#include <stdio.h>
int
main ()
{
double subtotal, tax, tax_rate;
double lamp, lamp_tax, visa, difference;
tax = 6.65;
subtotal = 94.98;
lamp = 55;
visa = 74.51;
tax_rate = tax / subtotal;
lamp_tax = lamp * tax_rate;
difference = visa - lamp - lamp_tax;
printf ("The tax rate at Lowe's on Paseo is %e per cent.\n", tax_rate);
printf ("You owe me exactly $%e for the outdoor light.\n", difference);
return 0;
}
// gcc judy1.c -o out
$
What would I have had to do with this printf to make it legible for a
retired schoolteacher?
$ gcc judy1.c -o out
$ ./out
The tax rate at Lowe's on Paseo is 7.001474e-02 per cent.
You owe me exactly $1.565919e+01 for the outdoor light.
$ echo "That's $15.66."
That's 5.66.
$ cat judy1.c
#include <stdio.h>
int
main ()
{
double subtotal, tax, tax_rate;
double lamp, lamp_tax, visa, difference;
tax = 6.65;
subtotal = 94.98;
lamp = 55;
visa = 74.51;
tax_rate = tax / subtotal;
lamp_tax = lamp * tax_rate;
difference = visa - lamp - lamp_tax;
printf ("The tax rate at Lowe's on Paseo is %e per cent.\n", tax_rate);
printf ("You owe me exactly $%e for the outdoor light.\n", difference);
return 0;
}
// gcc judy1.c -o out
$
What would I have had to do with this printf to make it legible for a
retired schoolteacher?