Howdy, Stranger!

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

Categories

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.

Comments

  • Shawn CarterShawn Carter Member Posts: 0

    { http://forcoder.org } free ebooks and video tutorials about | Python, C#, Objective-C, JavaScript, R, Scratch, C++, Ruby, Go, Java, MATLAB, PHP, C, Assembly, Swift, Visual Basic .NET, Visual Basic, PL/SQL, Delphi, Perl Prolog, Transact-SQL, Awk, Kotlin, Hack, Scala, LabVIEW, Scheme, VBScript, Julia, F#, SAS, Crystal, Erlang, Logo, Lisp, FoxPro, Alice, Dart, Clojure, Apex, Ada, Lua, COBOL, D, Rust, Fortran, Bash, ABAP, ML | _________

Sign In or Register to comment.