Question: Create an HLA Assembly language program that prompts for a value from the user and then prints the next six values starting with the value

Create an HLA Assembly language program that prompts for a value from the user and then prints the next six values starting with the value entered that are evenly divisible by six.
Here are some example program dialogues to guide your efforts:
Feed me: 11
12
18
24
30
36
42
Feed me: 12
12
18
24
30
36
42
Feed me: 40
42
48
54
60
66
72
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.
// print the next six numbers evenly divisible by six
int answer =0;
int x =0;
int howMany =6;
int evenlyDivisibleBy =6;
printf( "Feed Me: ");
scanf("%d", &x );
answer = x;
int i =1;
while( i <= howMany )
{
while( answer >0)
{
answer = answer - evenlyDivisibleBy;
}
if (answer ==0)
{
printf("%d
", x );
i = i +1;
}
x = x +1;
answer = x;
}

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 Databases Questions!