PLEASE HELP ME WITH A SQUARE ROOT PROGRAM!!!!

Guys please help me out with this program ASAP. I need it by tomorrow (Tuesday) until 2:00 PM. PLEASE!!!!

WRITE A VAL PROGRAM THAT COMPUTES "THE SQUARE ROOT OF AN INTEGER N" AS

FOLLOWS:

IF N < 0 OR N > 88047, HALT THE PROGRAM
IF N = 0, RETURN 0
IF N > 0, DO THE FOLLOWING:
IF N > 46340, THEN, N_OLD <-- 46340; OTHERWISE, N_OLD <-- N
(1) N_NEW <--[(N_OLD*N_OLD + N)/N_OLD]/2
IF N_OLD < OR = TO N_NEW, THEN RETURN N_NOLD AS THE SQUARE ROOT
OF N AND HALT; OTHERWISE, N_OLD <-- N_NEW AND REPEAT AT (1)

ASSEMBLE AND LINK THE PROGRAM USING THE DEBUG OPTION. THEN RUN THE
PROGRAM
VIA THE DEBUGGER USING THE FOLLOWING VALUES FOR N: 0, 16, 24, 25, 9999,
10000,
46340, 87616, 88047 AND 90000. IN EACH CASE, DISPLAY THE VALUES FOR N
AND
"THE SQUARE ROOT OF N" IN DECIMAL AND HEXADECIMAL. MAKE ONLY ONE DEBUGGER RUN WHICH INCLUDES ALL VALUES FOR N.

PRINT THE PROGRAM LIS FILE (OBTAINED BY ENTERING:"MACRO/DEB/LIS" WHEN
ASSEMBLING YOUR PROGRAM) AND THE DEBUGGER LOG FILE.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories