The document contains two C# programs: one for calculating the greatest common divisor (GCD) using Euclid's algorithm and another for solving the Tower of Hanoi problem. The GCD program prompts the user for two numbers and outputs their GCD, while the Tower of Hanoi program takes an integer input representing the number of disks and prints the steps to move them between pegs. Both programs utilize recursion to perform their respective calculations.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
4 views2 pages
TRABAJOS
The document contains two C# programs: one for calculating the greatest common divisor (GCD) using Euclid's algorithm and another for solving the Tower of Hanoi problem. The GCD program prompts the user for two numbers and outputs their GCD, while the Tower of Hanoi program takes an integer input representing the number of disks and prints the steps to move them between pegs. Both programs utilize recursion to perform their respective calculations.