Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Assembly Language Programming (ALP) Forum (http://www.go4expert.com/forums/assembly-language-programming-forum/)
-   -   a program for two decimals (http://www.go4expert.com/forums/program-decimals-t12959/)

nkhosinathie 15Aug2008 22:49

a program for two decimals
 
please help me i'm doing this new assembly language,so i'm still new to this.i actually need a step by step method.this is the task i'm doing to know the language.i was actually doing c++ so i hav now
changed to assembly.this is the task below,please anyone help.


Write a program which accepts two decimal digits from its user, prints a new line on the display
screen, and if the first digit is larger than the second, displays the average of the two digits (to the
nearest whole number) and otherwise displays the square root of the product of the two digits (to
the nearest whole number). Then the program should return to DOS control. Thus, if the user types
93
then the program displays
6
and if the user types
39
then the program displays
5
Hint: Think of easier way for square root calculation.

Joshua 16Aug2008 19:19

Re: a program for two decimals
 
please help me i'm doing this new assembly language,so i'm still new to this.i actually need a step by step method.this is the task i'm doing to know the language.i was actually doing c++ so i hav now
changed to assembly.this is the task below,please anyone help.


Write a program which accepts two decimal digits from its user, prints a new line on the display
screen, and if the first digit is larger than the second, displays the average of the two digits (to the
nearest whole number) and otherwise displays the square root of the product of the two digits (to
the nearest whole number). Then the program should return to DOS control. Thus, if the user types
93
then the program displays
6
and if the user types
39
then the program displays
5
Hint: Think of easier way for square root calculation.[/QUOTE]
show me the coded program in the Assembly language

Joshua 16Aug2008 19:23

Re: a program for two decimals
 
Write a program which accepts two decimal digits from its user, prints a new line on the display
screen, and if the first digit is larger than the second, displays the average of the two digits (to the
nearest whole number) and otherwise displays the square root of the product of the two digits (to
the nearest whole number). Then the program should return to DOS control. Thus, if the user types
93
then the program displays
6
and if the user types
39
then the program displays
5
Hint: Think of easier way for square root calculation.

Joshua 16Aug2008 19:56

Re: a program for two decimals
 
Write a program which accepts two decimal digits from its user, prints a new line on the display
screen, and if the first digit is larger than the second, displays the average of the two digits (to the
nearest whole number) and otherwise displays the square root of the product of the two digits (to
the nearest whole number). Then the program should return to DOS control. Thus, if the user types
93
then the program displays
6
and if the user types
39
then the program displays
5
Hint: Think of easier way for square root calculation.

[SIZE=2][FONT=Arial][COLOR=Black]

Joshua 16Aug2008 19:57

Re: a program for two decimals
 
Quote:

Originally Posted by Joshua
Write a program which accepts two decimal digits from its user, prints a new line on the display
screen, and if the first digit is larger than the second, displays the average of the two digits (to the
nearest whole number) and otherwise displays the square root of the product of the two digits (to
the nearest whole number). Then the program should return to DOS control. Thus, if the user types
93
then the program displays
6
and if the user types
39
then the program displays
5
Hint: Think of easier way for square root calculation.

[SIZE=2][FONT=Arial][COLOR=Black]

Write a program which accepts two decimal digits from its user, prints a new line on the display
screen, and if the first digit is larger than the second, displays the average of the two digits (to the
nearest whole number) and otherwise displays the square root of the product of the two digits (to
the nearest whole number). Then the program should return to DOS control. Thus, if the user types
93
then the program displays
6
and if the user types
39
then the program displays
5
Hint: Think of easier way for square root calculation.

shabbir 16Aug2008 22:25

Re: a program for two decimals
 
Joshua, Please don't have the same post here and there as it could lead to banning your account.


All times are GMT +5.5. The time now is 23:35.