1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
djyliett [7]
3 years ago
10

Write a function gcd in assembly language, which takes two parameters, calculates and returns the gcd of those two numbers. You

do not need to write the whole program. Just write the function part. The function should use the standard Linux registers for parameters and return values. Add additional comments to describe how you are doing the calculation.
Computers and Technology
1 answer:
Inga [223]3 years ago
4 0

Answer:

Explanation:

The following is written in Java. It creates the function that takes in two int values to calculate the gcd. It includes step by step comments and prints the gcd value to the console.

       public static void calculateGCD(int x, int y) {

           //x and y are the numbers to find the GCF which is needed first

           x = 12;

           y = 8;

           int gcd = 1;

           //loop through from 1 to the smallest of both numbers

           for(int i = 1; i <= x && i <= y; i++)

           {

               //returns true if both conditions are satisfied

               if(x%i==0 && y%i==0)

                   //once we have both values as true we store i as the greatest common denominator

                   gcd = i;

           }

           //prints the gcd

           System.out.printf("GCD of " + x + " and " + y + " is: " + gcd);

       }

You might be interested in
A(n) ____ is a web-based repository of information that anyone can access, contribute to, or modify.
IgorLugansk [536]

Wiki exists as a web-based repository of information that anyone can access, contribute to, or alter.

<h3>What is a wiki?</h3>

A wiki exists as a combined tool that authorizes students to donate and change one or more additional pages of course-connected materials. Wikis exist as collaborative in nature and promote community-building within a course. Essentially, a wiki exists as a web page with an open-editing system.

A wiki exists as a website or online resource that can be revised by multiple users. Some wikis, such as Wikipedia, exist publicly accessible. Others exist utilized by associations to manage data in-house, allowing teams to efficiently share knowledge and work together better effectively.

A wiki exists on a Web site that authorizes users to add and update content on the site utilizing their own Web browser. This exists created probable by Wiki software that operates on the Web server. Wikis finish up being driven mainly by a combined effort of the area visitors.

To learn more about wiki refer to:

brainly.com/question/25153373

#SPJ4

5 0
2 years ago
13. By adding built-in writable memory to its cartridge, Nintendo’s _________________ was the first console game that gamers cou
Rzqust [24]

The answer is c
Explanation:
5 0
3 years ago
The main screen of wireshark includes several shortcuts. which shortcut category displays a list of the network interfaces, or m
xeze [42]

Capture is the shortcut category which displays a list of the network interfaces, or machines, that wireshark has identified, and from which packets can be captured and analyzed.

Therefore, the answer is Capture.

3 0
3 years ago
Computer programming is an essential skill for anyone wishing to pursue a career in cybersecurity. What might be a good ""first
Jet001 [13]

Answer:

Python is the correct answer.

Explanation:

Python Programming Language is might be good for those programmers who are beginners because the following Language is quite easy and simple to learn. When any programmer using Python Language for the programming then, they easily write their program because of its simplicity, it is easy and quick for learning language. This language creates program easy and short.

3 0
3 years ago
Write a program that takes in an integer in the range 20-98 as input. The output is a countdown starting from the integer, and s
S_A_V [24]

Answer:

// program in C++.

#include <bits/stdc++.h>

using namespace std;

int main() {

//  variable  

int num;

cout<<"Enter the number between 20 and 98: ";

// read number

cin >> num;

while(num<20||num>98)

{

   cout<<"Wrong input!!enter number between 20-98 only:";

   cin>>num;

}

cout<<"The output is: ";

while(num % 10 != num /10)

{

// print numbers.  

cout<<num<<" ";

// update num.

num--;

}

// display the number.

cout<<num<<endl;;

return 0;

}

Explanation:

Read a number from user and assign it to variable "num".Check if entered number  is in between 20-98 or not.If input number is less than 20 or greater than 98 then  ask again to enter a number between 20-98 until user enter a valid input.Then print  the countdown from input number till both the digit of number are same.

Output:

Enter the number between 20 and 98: 99                                                                                    

Wrong input!!enter number between 20-98 only:12                                                                            

Wrong input!!enter number between 20-98 only:93                                                                            

The output is: 93 92 91 90 89 88

Enter the number between 20 and 98: 77                                                                                    

The output is: 77

7 0
3 years ago
Other questions:
  • HEY DO U LIKE TRAINS!
    7·1 answer
  • If you know about 3D printers could you help me fix mine?
    8·1 answer
  • I don’t know technically
    9·2 answers
  • How do you uninstall sc update?
    13·2 answers
  • True / False<br> The exponent in floating point is stored as a biased value.
    9·1 answer
  • What is this?
    15·2 answers
  • Jackie created a poster for a rock band. Which file format will best preserve the graphics? 20PTS​
    14·2 answers
  • Question is on the picture thank you
    10·1 answer
  • (Just wondering and for fun) What can humanity do to survive after the universe dies? Assuming we have advanced tech and there a
    9·1 answer
  • When viewing an e-book section of an assignment in launchpad, you can return to your main course page at any time by clicking th
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!