	PRINT "PROGRAM TO PRINT EFFECTIVE NETWORK RESISTANCE"
LOOP:	INPUT "RL, RW, C " RL,RW,C
	PRINT "RR FOR INFINITE CHAIN =";RW+SQR(RW^2+2*RL*RW)

	RR=1E30
	VIN=3.5
	PRINT "SEGMENTS","RESISTANCE","VOLTAGE","TIME"
	FOR I=1 TO 256
		RR=(RR+2*RW)*RL/((RR+2*RW)+RL)
		VIN=VIN*RL/(2*RW+RL)
		TIMECONSTANT=C*1000*RR
		PRINT I,RR,VIN,TIMECONSTANT
	NEXT I

	VRATIO=RR*RL/(RR*RL+2*RW*RR+2*RW*RL)
	NSEGMENTS=LOG(1/3.5)/LOG(VRATIO)
	TIMECONSTANT=C*RL/2
	PRINT "RR=";RR;"VRATIO=";VRATIO;"NSEGMENTS=";NSEGMENTS;"TIME=";TIMECONSTANT
	PRINT "FOR RR=100 OHMS, TIMECONSTANT=";1000*C*100/2
	GOTO LOOP
	END
