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
Nataly_w [17]
2 years ago
14

Write a simple program that takes in a numerator and denominator and then computes the GCD for that fraction. You can assume tha

t there is a GCD for any fraction entered. Once you have found the GCD, print the original fraction and the fraction reduced with the GCD to the command line. To get full credit for this assignment, you must use iteration. java
Computers and Technology
1 answer:
Marizza181 [45]2 years ago
3 0

A simple program that takes in a numerator and denominator and then computes the GCD for that fraction is Enter your and then Enter your denominator: zero Invalid input, denominator can't be zero.

<h3>What is numerator and denominator in programming?</h3>
  1. Enter your denominator: zero Invalid input, denominator can't be zero.
  2. Enter your denominator: 3
  3. The lowest phrases of your fraction: 34/3
  4. Enter your denominator: 6.
  5. The lowest phrases of your fraction: 1/2
  6. ++ Code

  1. # include
  2. # include
  3. the use of namespace std;
  4. // Function to calculate GCD
  5. int g_c_d(int num1, int num2)
  6. go back num2;
  7.   if (num2 == 0)
  8. go back num1 if (num1 == num2)
  9. go back num1;
  10. // Function to lessen to fraction to lowest phrases
  11. bool to_lowest_terms(int &numerator, int &denominator)
  12. {
  13. if (denominator == 0)
  14.   if (numerator == 0)
  15.  cout << "nThe lowest phrases of your fraction: " << 0 xss=removed> 0 && denominator > 0);
  16. numerator = abs(numerator);
  17. denominator = abs(denominator);
  18. int factor = g_c_d(numerator, denominator)

Read more about GCD :

brainly.com/question/219464

#SPJ1

You might be interested in
Brian is a computer engineer who writes security software for a banking system. The
pashok25 [27]

Answer:

Programming & Software Development

Explanation:

Software development life cycle (SDLC) can be defined as a strategic process or methodology that defines the key steps or stages for creating and implementing high quality software applications.

Some of the models used in the software development life cycle (SDLC) are;

I. A waterfall model.

II. An incremental model.

III. A spiral model.

Also, programming refers to a software development process which typically involves writing the sets of instructions (codes) that are responsible for the proper functioning of a software.

In this scenario, Brian is a computer engineer who writes security software for a banking system.

Thus, the pathway in the Information Technology career cluster that Brian's job falls into is Programming & Software Development.

7 0
3 years ago
How long are most personal vision statements?
ki77a [65]

Answer:

Your personal vision statement guides your life and provides the direction necessary to chart the course of your days and the choices you make about your career, life, and family.Think of your personal vision statement as the light shining in the darkness that illuminates your path through the forest of life.Write in the first person and make statements about the future you hope to achieve. Write the statements as if you are already making them happen in your life. Some experts recommend 50 words or less, but forget word counts and fully articulate the vision that you want for your life and your future.Writing a vision statement is the first step in focusing on your life. It can help put things into perspective—your joy, your accomplishments, your family life, and your contributions.Ask yourself some guiding questions to start yourself off. Be honest. Your answers can help you clearly illustrate your vision.

As you collect information on yourself, take time to formulate your thoughts cohesively into descriptive sentences or paragraphs that summarize single values or characteristics.

8 0
3 years ago
Write an algorithm to check whether the given number is divisible by 2,3 and 6 or not​​
olga2289 [7]

Answer:

Start

Input n, 2

Calculate if (n%2==0) then is divisible else not divisible

Output number is divisible or not

Stop

Explanation:

3 0
3 years ago
Why is this app here to help but wont let me see answers to my questions?
UkoKoshka [18]

Answer:

maybe you need to reload the page and press the little bell on the right side and u should get a notification when somebody answers your question and if that doesnt help go to your profile and press the tab (on this tab if that makes since) it should say sumin like questions you asked and u should press the ones u need the answers to

Explanation:

lmk if this helped

5 0
3 years ago
Read 2 more answers
Which of the following was the name of the first generation of cell phone networks?
coldgirl [10]

Answer:

1G

Explanation:

1 'G' as in first generation.

Hope this helped. :)

3 0
3 years ago
Other questions:
  • Many web pages today use ____ —small text files that are stored on your hard drive by a web server, typically the one associated
    6·2 answers
  • Which software application should be used to communicate in writing about an upcoming event?
    12·2 answers
  • The students of a college have to create their assignment reports using a word processing program. Some of the questions in thei
    5·2 answers
  • Which function is going to find the lowest value in a range of numbers? MIN MAXAVERAGE COUNT
    5·1 answer
  • When determining the amount of RAM necessary for a computer you wish to purchase, what should you consider?
    7·1 answer
  • Develop Swimlane Activity diagram for Assignment announcement and submission system.
    6·1 answer
  • Clasifica los documentos comerciales en activo, pasivo o patrimonial para cada operacion:
    14·1 answer
  • What is the answer to 4.9 Code Practice: Question 2
    14·1 answer
  • In the range D5:D9 on all five worksheets, Gilberto wants to project next year's sales for each accessory, rounded up to zero de
    6·1 answer
  • . . ........Sad + sad= very sad
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!