• write a program that reads two integer values from the user and then prints the Greatest Common Factor (if exits). The Greatest Common Factor is the largest integer that both integers are divisible by. (1 is excluded from the definition). Example: if a=35 and b=150 then the Greatest Common Factor (GCF) for them is 5 because 5 is the largest integer that both 35 and 150 are divisible by (without any remainder).

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 21PE
icon
Related questions
Question

Computer Science

please can you solve it using C++ . I need normal program using loops. 
• write a program that reads two integer values
from the user and then prints the Greatest
Common Factor (if exits). The Greatest Common
Factor is the largest integer that both integers are
divisible by. (1 is excluded from the definition).
Example: if a=35 and b=150 then the Greatest
Common Factor (GCF) for them is 5 because 5 is
the largest integer that both 35 and 150 are
divisible by (without any remainder).
Transcribed Image Text:• write a program that reads two integer values from the user and then prints the Greatest Common Factor (if exits). The Greatest Common Factor is the largest integer that both integers are divisible by. (1 is excluded from the definition). Example: if a=35 and b=150 then the Greatest Common Factor (GCF) for them is 5 because 5 is the largest integer that both 35 and 150 are divisible by (without any remainder).
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning