Commit 0ba6aec6 authored by Ahmad Nemati's avatar Ahmad Nemati

git pull

parent b1c4343d
...@@ -7,7 +7,7 @@ let res ...@@ -7,7 +7,7 @@ let res
let arr = [] let arr = []
let arrRange = [] let arrRange = []
let lastBalance = 1000 let lastBalance = 1000
let size = 25 let size = 100
let balance = lastBalance let balance = lastBalance
init() init()
...@@ -244,7 +244,8 @@ async function run() { ...@@ -244,7 +244,8 @@ async function run() {
if (arrDate[0].sum === 0) if (arrDate[0].sum === 0)
return return
console.log('Balance ->', balance - lastBalance) console.log('Balance ->', balance - lastBalance)
let worth = (balance - lastBalance) / (arrNew[0].sum-1000) let worth = (balance - lastBalance) / (arrNew[0].sum)
console.log((balance - lastBalance),(arrNew[0].sum))
console.log('Worth ->', worth) console.log('Worth ->', worth)
......
...@@ -153,10 +153,10 @@ async function run() { ...@@ -153,10 +153,10 @@ async function run() {
// console.log('Balance ->',balance) // console.log('Balance ->',balance)
// console.log('Worth ->',arrNew[0]) // console.log('Worth ->',arrNew[0])
let worth = (balance - lastBalance) / (arrNew[0].sum-1000) let worth = (balance - lastBalance) / (arrNew[0].sum)
if (worth < base) { if (worth < base) {
base = worth base = worth
console.log(arrNew[0].sum-1000, balance - lastBalance, worth) console.log(arrNew[0].sum, balance - lastBalance, worth)
let arr5 = [] let arr5 = []
for (let f = 0; f < size; f++) { for (let f = 0; f < size; f++) {
arr5.push(com[f]) arr5.push(com[f])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment