Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatyana-js committed Oct 13, 2023
1 parent 9fcb69c commit c7bf10b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
[![Actions Status](https://github.com/Tanya14081981/frontend-project-44/workflows/hexlet-check/badge.svg)](https://github.com/Tanya14081981/frontend-project-44/actions)[![Maintainability](https://api.codeclimate.com/v1/badges/fb74f85f99b4a3def279/maintainability)](https://codeclimate.com/github/Tanya14081981/frontend-project-44/maintainability)
[![asciicast](https://asciinema.org/a/zvjF8kuKtS1kQq1tsTn6nrJ9X.svg)](https://asciinema.org/a/zvjF8kuKtS1kQq1tsTn6nrJ9X)
[![asciicast](https://asciinema.org/a/80aEm0j9jSN4PvcgJ6dGstUcG.svg)](https://asciinema.org/a/80aEm0j9jSN4PvcgJ6dGstUcG)
[![asciicast](https://asciinema.org/a/AslmjHGvRdJ3wVy362nPGGLUV.svg)](https://asciinema.org/a/AslmjHGvRdJ3wVy362nPGGLUV)
2 changes: 1 addition & 1 deletion bin/brain-gcd.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env node

import maxGeneralDivider from '../games/calc.js';
import maxGeneralDivider from '../games/gcd.js';

maxGeneralDivider();
5 changes: 3 additions & 2 deletions games/gcd.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import greetGamer from '../src/cli.js';
import getRandomInt from '../function/getRandomInt.js';

const getMaxDevidor = (numberOne, numberTwo) => {
let maxDevidor = 0;
const maxNum = Math.max(numberOne, numberTwo);
let maxDevidor = 1;
let value1 = numberOne;
let value2 = numberTwo;
for (let i = 1; i <= numberOne; i += 1) {
for (let i = 1; i <= maxNum; i += 1) {
if (value1 === value2) {
maxDevidor = value1;
} else if (value1 > value2) {
Expand Down

0 comments on commit c7bf10b

Please sign in to comment.