astush1001/Calculate-Me

Percentage (%) operation Not working

Opened this issue · 9 comments

Percentage (%) operation Not working

Hey @astush1001 I can work on this issue. Please assign me

Okay !

Can you please assign me

Hey @astush1001 just a question you want the (%) operator to do the modulus function or percentage function? In case of modulus it'll return the remainder of a division. Say 9 % 2 = 1. In case of percentage it'll divide the value by 100 and return it. Say 9% = 0.09. Also checked that for percentage if any number is pressed after % it'll automatically multiply the next number. It'll look like this: 9% x 2.

As of now I've implemented both the operations. It's checking if there's any number after % sign. If so it'll evaluate the modulus function else it'll implement percent function. There's just 2 lines of code change, I'm sending a PR please check out and let me know if any changes need to be done

Hey @astush1001 any updates on the PR I sent?

Hey @theDevSoham ! Sorry for delay.
Actually I checked your modification but Still it doesn't serve the purpose.
I want to calculate percentage by "%" operator
for example : 87%500 should give me 435 i.e. it should calculate the percentage just as in some other calculator.

See if you can do something regarding that.

@astush1001 gotcha...btw the percentage function is also there. I'll check and update the PR accordingly.

@astush1001 Pushed the new changes please check

Hello @astush1001 any updates yet?