SlideServe
Menu
Préférences
© SlideServe · v2026

using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 {

mccarterd avatar
11 diapositives · 154 Views · Jan 04, 2020

using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Program { static int Mod(int x, int y) { while (x >= y) x = x - y; return x; }

using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { - slide 1
01 / 11using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 {
1 / 17

Télécharger la présentation

using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 {
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Program { static int Mod(int x, int y) { while (x >= y) x = x - y; return x; } static void Main(string[] args) { int n, m, reminder; Console.WriteLine("Enter two numbers"); n = int.Parse(Console.ReadLine()); m = int.Parse(Console.ReadLine()); while (m > 0) { reminder = Mod(n, m); n = m; m = reminder; } Console.WriteLine("The GCD is: " + n); } } } התוכנית:

  2. using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Program { static int Mod(int x, int y) { while (x >= y) x = x - y; return x; } static void Main(string[] args) { int n, m, reminder; Console.WriteLine("Enter two numbers"); n = int.Parse(Console.ReadLine()); m = int.Parse(Console.ReadLine()); while (m > 0) { reminder = Mod(n, m); n = m; m = reminder; } Console.WriteLine("The GCD is: " + n); } } } 15,4 התוכנית:

  3. using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Program { static int Mod(int x, int y) { while (x >= y) x = x - y; return x; } static void Main(string[] args) { int n, m, reminder; Console.WriteLine("Enter two numbers"); n = int.Parse(Console.ReadLine()); m = int.Parse(Console.ReadLine()); while (m > 0) { reminder = Mod(n, m); n = m; m = reminder; } Console.WriteLine("The GCD is: " + n); } } } Mod??!? התוכנית:

  4. using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Program { static int Mod(int x, int y) { while (x >= y) x = x - y; return x; } static void Main(string[] args) { int n, m, reminder; Console.WriteLine("Enter two numbers"); n = int.Parse(Console.ReadLine()); m = int.Parse(Console.ReadLine()); while (m > 0) { reminder = Mod(n, m); n = m; m = reminder; } Console.WriteLine("The GCD is: " + n); } } } 15,4 התוכנית:

  5. using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Program { static int Mod(int x, int y) { while (x >= y) x = x - y; return x; } static void Main(string[] args) { int n, m, reminder; Console.WriteLine("Enter two numbers"); n = int.Parse(Console.ReadLine()); m = int.Parse(Console.ReadLine()); while (m > 0) { reminder = Mod(n, m); n = m; m = reminder; } Console.WriteLine("The GCD is: " + n); } } } התוכנית:

  6. הפעולה: static int Mod(int x, int y) { while (x>=y) x=x-y; return x; }

  7. static int Mod(int x, int y) { while (x>=y) x=x-y; return x; }

  8. static int Mod(int x, int y) { while (x>=y) x=x-y; return x; }

  9. using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Program { static int Mod(int x, int y) { while (x >= y) x = x - y; return x; } static void Main(string[] args) { int n, m, reminder; Console.WriteLine("Enter two numbers"); n = int.Parse(Console.ReadLine()); m = int.Parse(Console.ReadLine()); while (m > 0) { reminder = Mod(n, m); n = m; m = reminder; } Console.WriteLine("The GCD is: " + n); } } } התוכנית:

  10. using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Program { static int Mod(int x, int y) { while (x >= y) x = x - y; return x; } static void Main(string[] args) { int n, m, reminder; Console.WriteLine("Enter two numbers"); n = int.Parse(Console.ReadLine()); m = int.Parse(Console.ReadLine()); while (m > 0) { reminder = Mod(n, m); n = m; m = reminder; } Console.WriteLine("The GCD is: " + n); } } } התוכנית:

  11. using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Program { static int Mod(int x, int y) { while (x >= y) x = x - y; return x; } static void Main(string[] args) { int n, m, reminder; Console.WriteLine("Enter two numbers"); n = int.Parse(Console.ReadLine()); m = int.Parse(Console.ReadLine()); while (m > 0) { reminder = Mod(n, m); n = m; m = reminder; } Console.WriteLine("The GCD is: " + n); } } } 3 התוכנית: