Question
Please open pdf: https://www.dropbox.com/sh/v4afd0esdy5u0r6/AADJZ8DD0DbzOIZL0U-lFtwqa?dl=0 Euclids Algorithm solves the problem of finding the greatest common divisor of two non-negative, non-zero integers. You will create a program
Please open pdf: https://www.dropbox.com/sh/v4afd0esdy5u0r6/AADJZ8DD0DbzOIZL0U-lFtwqa?dl=0
Euclids Algorithm solves the problem of finding the greatest common divisor of two non-negative, non-zero integers. You will create a program that will calculate the greatest common divisor of two integers based on Euclids Algorithm. SPECIFICATIONS Your source code should be contained in a single file and should be named your TTU email address excluding the @students.tntech.edu and an underscore and an A to indicate part A (example: acrockett_A.cpp). Write a C++ program to find the greatest common divisor of two numbers m and n based on Euclids algorithm. Your program should be able to calculate the greatest common divisor for all inputs for which it is defined; you may assume the input values can be stored in an int data type. Your program will take in two command arguments specifying the value of m and n, and will write to standard output the text gcd([m],[n]) = [v] where [m], [n], and [v] are the values of m, n, and gcd(m,n), respectively. In the case where the greatest common divisor is not defined, you will print the text gcd([m],[n]) is undefined. Refer to the sample output.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started