Question: Create an HLA Assembly language program that prompts for four integral values from the user and determines that they are decreasing in value from one

Create an HLA Assembly language program that prompts for four integral values from the user and determines that they are decreasing in value from one to the next.
Here are some example program dialogues to guide your efforts:
Feed me: 11
Feed me: 4
Feed me: 2
Feed me: 1
decreasing!
Feed me: 12
Feed me: 12
Feed me: 8
Feed me: 24
not decreasing!
In an effort to help you focus on building an Assembly program, Id like to offer you the following C statements which match the program specifications stated above. If you like, use them as the basis for building your Assembly program.
bool result = true;
int n, n1, n2, n3;
scanf( "Feed me: %d", &n );
scanf( "Feed me: %d", &n1);
scanf( "Feed me: %d", &n2);
scanf( "Feed me: %d", &n3);
// all decreasing values
if (n >= n1)
result = false;
else if (n >= n2)
result = false;
else if (n >= n3)
result = false;
else if (n1>= n2)
result = false;
else if (n1>= n3)
result = false;
else if (n2>= n3)
result = false;
if (result)
printf( "decreasing!
");
else
printf( "not decreasing!
");

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!