This program implements a variable (flexible) budget calculator for cost accounting purposes. The user enters cost figures at 100% of normal capacity — including direct materials, direct labor, fringe benefits, supervisory expenses, maintenance, depreciation, insurance, and property taxes — and the program projects each cost at 70%, 80%, 90%, and 100% of capacity. Fixed costs (depreciation, insurance, property taxes, fixed portions of supervisory and maintenance) remain constant across capacity levels, while variable costs scale proportionally with direct labor. Results are displayed in a columnar report using TAB positioning and a mix of comma and semicolon separators. The fringe benefit input is normalized at line 74–80, accepting either a decimal fraction or a percentage value.
Program Analysis
Program Structure
The program divides cleanly into three phases: input collection (lines 5–158), calculation (lines 170–560), and output (lines 570–710). All inputs are gathered first and echoed immediately after each INPUT statement, a common technique to confirm entry on machines with limited screen real estate. Calculations are then performed in a batch, and the formatted report is printed last.
Variable Map
| Variable | Meaning | Type |
|---|---|---|
A | Direct material at 100% | Fixed input |
B | Direct labor at 100% | Fixed input |
C | Fringe benefit rate (converted to decimal) | Fixed input |
D | Fixed supervisory expense | Fixed input |
E | Variable supervisory expense per $1 of direct labor | Fixed input |
F | Fixed maintenance expense | Fixed input |
G | Variable maintenance expense per $1 of direct labor | Fixed input |
H, I, J | Depreciation, insurance, property taxes | Pure fixed costs |
A1–A3 | Direct material at 70%, 80%, 90% | Calculated |
B1–B3 | Direct labor at 70%, 80%, 90% | Calculated |
C1–C4 | Fringe benefits at each capacity level | Calculated |
K1–K4 | Supervisory expense at each level | Calculated |
L1–L4 | Maintenance expense at each level | Calculated |
M1–M4 | Total budget at each capacity level | Calculated |
Cost Model
The program models a classic semi-variable (mixed) cost structure. Purely variable costs (direct materials, direct labor, fringe benefits) scale linearly with capacity. Supervisory and maintenance expenses are modeled as semi-variable: a fixed base (D or F) plus a variable rate per dollar of direct labor (E*Bn or G*Bn). Depreciation, insurance, and property taxes are treated as purely fixed and remain identical across all four columns.
Fringe Benefit Rate Normalization
Lines 74–80 implement a simple dual-input convention: if the user enters a value of 1 or greater (e.g. 25 for 25%), the program divides by 100 to convert it to a decimal. If the user already enters a decimal fraction (e.g. 0.25), it is used directly. This avoids a hard crash from an incorrectly scaled rate, though the threshold of 1 means a rate of exactly 100% cannot be entered as a whole number without being misidentified as already a decimal.
Output Formatting
The report header at line 600 uses TAB 10 followed by concatenated string literals separated by semicolons to align the four capacity-level headings. Data rows (lines 610–700) use a mixed separator style: a comma after the first data value and semicolons between the remaining three. On this platform, a comma advances to the next print zone while a semicolon continues without spacing, which means the column alignment of the output is inconsistent — the first value after TAB(10) occupies a full print zone, while subsequent values are packed together. This may cause misalignment between the header row and the data rows.
Use of INT()
All calculated intermediate values are truncated to integers using INT(). This is applied to variable costs and semi-variable costs but not to the fixed cost inputs (H, I, J), which are used directly. The totals M1–M4 are computed by summing already-truncated values rather than truncating the sum, so rounding errors from individual line items accumulate into the total rather than being absorbed.
Notable Anomalies
- Line 710 uses
STOPto end execution, which is correct; lines 720 (SAVE) and 730 (LIST) are utility lines that follow and would only execute if run directly, not as part of normal program flow. - The REM at line 5 misspells “VARIABLE” as “VARIBLE”, though the printed title at line 6 is spelled correctly.
- The mixed use of comma and semicolon separators in the data rows (lines 610–700) will cause the numeric columns to not align with the header string in line 600, since string concatenation with semicolons does not insert zone spacing.
- There is no input validation beyond the fringe-benefit rate check; negative or zero values for costs are accepted silently.
Content
Source Code
5 REM VARIBLE BUDGET(VARBUD)
6 PRINT "VARIABLE BUDGET"
10 PRINT
20 PRINT "ENTER ALL COSTS AT 100PCT. OF NORMAL CAPACITY"
30 PRINT
40 PRINT "ENTER DIRECT MATERIAL"
45 INPUT A
46 PRINT A
50 PRINT "ENTER DIRECT LABOR"
55 INPUT B
56 PRINT B
60 PRINT "ENTER FRINGE BENEFITS AS A PCT. OF DIRECT LABOR"
70 INPUT C
71 PRINT C
74 IF C<1 THEN GOTO 90
80 LET C=C/100
90 PRINT "ENTER FIXED SUPERVISORY EXPENSE"
95 INPUT D
96 PRINT D
100 PRINT "ENTER VARIABLE SUPERVISORY EXPENSE PER $1 OF DIRECT LABOR"
110 INPUT E
111 PRINT E
120 PRINT "ENTER FIXED MAINTENANCE EXPENSE"
125 INPUT F
126 PRINT F
130 PRINT "ENTER VARIABLE MAINTENANCE EXPENSE PER $1 OF DIRECT LABOR"
140 INPUT G
141 PRINT G
150 PRINT "ENTER DEPRECIATION"
151 INPUT H
152 PRINT H
153 PRINT "ENTER INSURANCE"
154 INPUT I
155 PRINT I
156 PRINT "ENTER PROPERTY TAXES"
157 INPUT J
158 PRINT J
170 LET A1=INT (.7*A)
200 LET A2=INT (.8*A)
210 LET A3=INT (.9*A)
230 LET B1=INT (.7*B)
250 LET B2=INT (.8*B)
270 LET B3=INT (.9*B)
290 LET C1=INT (C*B1)
310 LET C2=INT (C*B2)
330 LET C3=INT (C*B3)
350 LET C4=INT (C*B)
370 LET K1=INT (D+(E*B1))
390 LET K2=INT (D+(E*B2))
410 LET K3=INT (D+(E*B3))
430 LET K4=INT (D+(E*B))
450 LET L1=INT (F+(G*B1))
470 LET L2=INT (F+(G*B2))
490 LET L3=INT (F+(G*B3))
510 LET L4=INT (F+(G*B))
530 LET M1=A1+B1+C1+K1+L1+H+I+J
540 LET M2=A2+B2+C2+K2+L2+H+I+J
550 LET M3=A3+B3+C3+K3+L3+H+I+J
560 LET M4=A+B+C4+K4+L4+H+I+J
570 PRINT
580 PRINT "VARIABLE BUDGET(PCT. OF NORMAL CAPACITY)"
590 PRINT
600 PRINT TAB 10;"70PC"; " 80PC"; " 90PC"; " 100PC"
610 PRINT "DIR.MAT.";TAB (10);A1,A2;A3;A
620 PRINT "DIR.LAB.";TAB (10);B1,B2;B3;B
630 PRINT "PAY FRGS";TAB (10);C1,C2;C3;C4
640 PRINT "SPVSN.";TAB (10);K1,K2;K3;K4
650 PRINT "MAINT.";TAB (10);L1,L2;L3;L4
660 PRINT "DEPR.";TAB (10);H,H;H;H
670 PRINT "INSR.";TAB (10);I,I;I;I
680 PRINT "PRTAXS.";TAB (10);J,J;J;J
690 PRINT TAB (10);"*****"; "*****"; "*****"; "*****"
700 PRINT "TL.BUDGET";TAB (10);M1,M2;M3;M4
710 STOP
720 SAVE "1011%5"
730 LIST
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.
