using System using System Collections Generic using System

  • Slides: 11
Download presentation
using System; using System. Collections. Generic; using System. Text; namespace Console. Application 1 {

using System; using System. Collections. Generic; using System. Text; namespace Console. Application 1 { 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. Write. Line("Enter two numbers"); n = int. Parse(Console. Read. Line()); m = int. Parse(Console. Read. Line()); while (m > 0) { reminder = Mod(n, m); n = m; m = reminder; } Console. Write. Line("The GCD is: " + n); } } } : התוכנית

using System; using System. Collections. Generic; using System. Text; namespace Console. Application 1 {

using System; using System. Collections. Generic; using System. Text; namespace Console. Application 1 { 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. Write. Line("Enter two numbers"); n = int. Parse(Console. Read. Line()); m = int. Parse(Console. Read. Line()); while (m > 0) { reminder = Mod(n, m); n = m; m = reminder; } Console. Write. Line("The GCD is: " + n); } } } : התוכנית 15, 4

using System; using System. Collections. Generic; using System. Text; namespace Console. Application 1 {

using System; using System. Collections. Generic; using System. Text; namespace Console. Application 1 { 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. Write. Line("Enter two numbers"); n = int. Parse(Console. Read. Line()); m = int. Parse(Console. Read. Line()); while (m > 0) { reminder = Mod(n, m); n = m; m = reminder; } Console. Write. Line("The GCD is: " + n); } } } : התוכנית Mod? ? !?

using System; using System. Collections. Generic; using System. Text; namespace Console. Application 1 {

using System; using System. Collections. Generic; using System. Text; namespace Console. Application 1 { 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. Write. Line("Enter two numbers"); n = int. Parse(Console. Read. Line()); m = int. Parse(Console. Read. Line()); while (m > 0) { reminder = Mod(n, m); n = m; m = reminder; } Console. Write. Line("The GCD is: " + n); } } } : התוכנית 15, 4

using System; using System. Collections. Generic; using System. Text; namespace Console. Application 1 {

using System; using System. Collections. Generic; using System. Text; namespace Console. Application 1 { 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. Write. Line("Enter two numbers"); n = int. Parse(Console. Read. Line()); m = int. Parse(Console. Read. Line()); while (m > 0) { reminder = Mod(n, m); n = m; m = reminder; } Console. Write. Line("The GCD is: " + n); } } } : התוכנית

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

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

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

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

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

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 Console. Application 1 {

using System; using System. Collections. Generic; using System. Text; namespace Console. Application 1 { 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. Write. Line("Enter two numbers"); n = int. Parse(Console. Read. Line()); m = int. Parse(Console. Read. Line()); while (m > 0) { reminder = Mod(n, m); n = m; m = reminder; } Console. Write. Line("The GCD is: " + n); } } } : התוכנית

using System; using System. Collections. Generic; using System. Text; namespace Console. Application 1 {

using System; using System. Collections. Generic; using System. Text; namespace Console. Application 1 { 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. Write. Line("Enter two numbers"); n = int. Parse(Console. Read. Line()); m = int. Parse(Console. Read. Line()); while (m > 0) { reminder = Mod(n, m); n = m; m = reminder; } Console. Write. Line("The GCD is: " + n); } } } : התוכנית

using System; using System. Collections. Generic; using System. Text; namespace Console. Application 1 {

using System; using System. Collections. Generic; using System. Text; namespace Console. Application 1 { 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. Write. Line("Enter two numbers"); n = int. Parse(Console. Read. Line()); m = int. Parse(Console. Read. Line()); while (m > 0) { reminder = Mod(n, m); n = m; m = reminder; } Console. Write. Line("The GCD is: " + n); } } } : התוכנית 3