Have you tried to work it out by hand?
I ran the code through the debugger one line at a time.
The individual values of netcost, discount and tax all seem fine.
If you want a different answer, it needs a different calculation.
Code:
$ gcc -g -Wall foo.c
foo.c: In function ‘main’:
foo.c:6:29: warning: unused variable ‘discount’ [-Wunused-variable]
float priceperminute = 8, discount = 0, grosscost = 0, netcost = 0;
^
$ gdb -q ./a.out
Reading symbols from ./a.out...done.
(gdb) b main
Breakpoint 1 at 0x4005fe: file foo.c, line 4.
(gdb) run
Starting program: ./a.out
Breakpoint 1, main () at foo.c:4
4 {
(gdb) n
6 float priceperminute = 8, discount = 0, grosscost = 0, netcost = 0;
(gdb)
8 printf("Input the start time of the call:");
(gdb)
9 scanf("%d", &time);
(gdb)
Input the start time of the call:1800
10 printf("Input the length of the call in minutes:");
(gdb)
11 scanf("%d", &min);
(gdb)
Input the length of the call in minutes:61
13 grosscost = min * priceperminute;
(gdb)
15 if (time >= 800 && time <= 1800) {
(gdb) p grosscost
$1 = 488
(gdb) n
16 netcost = grosscost;
(gdb)
20 if (min >= 60)
(gdb)
21 netcost -= netcost * 0.15;
(gdb)
23 float tax = netcost * 4.0 / 100;
(gdb) p netcost
$2 = 414.799988
(gdb) n
24 netcost = netcost + tax;
(gdb) p tax
$3 = 16.5919991
(gdb) n
26 printf("Grosscost:%.2f", grosscost);
(gdb) p grosscost
$4 = 488
(gdb) n
27 printf("\nNetcost:%.2f", netcost);
(gdb) p netcost
$5 = 431.391998
(gdb)