+ 2

# Math calculation of percentage

how to math calculation of percentage? such as: 30 % 4 or 369% 35.

6th Apr 2020, 11:29 AM
+ 2
I mean % in javascript. what does it mean in js?
6th Apr 2020, 2:07 PM
+ 2
modulo operator means?explain it?
6th Apr 2020, 2:11 PM
+ 2
it means division operator. right! thanks jaya and visph
6th Apr 2020, 2:13 PM
+ 1
you mean in programming? In JavaScript : var a=30; var b=4; document.write(a%b) ; Output: 2 If not, Please provide your problem description clearly..
6th Apr 2020, 11:53 AM
Jayakrishna ๐ฎ๐ณ
+ 1
Math percentages and programming operator % aren't related at all... In computer context, x % y means remainder of the integer division of x by y (named 'modulo' in both math and computer fields). In math context, x% of y means x hundredths of y, in other words: value = float(input()) rate = float(input()) percent = value*rate/100 print(str(rate)+'% of',value,'equals',percent)
6th Apr 2020, 12:12 PM
visph
+ 1
in js that's the modulo operator ^^
6th Apr 2020, 2:11 PM
visph
+ 1
That's already said in my first post...
6th Apr 2020, 2:12 PM
visph
+ 1
It's called modular operator.. Gives you reminder of calculation (a%b) in dividend(a) divided by divisor(b). I included already a example in my first post, see it again..
6th Apr 2020, 2:13 PM
Jayakrishna ๐ฎ๐ณ
+ 1
Shadman Sakib Division operator is / returns quotiont. a=30,b=4 document.write(a/b); this prints 7 Modula operator is % returns reminder. document.write(a%b); this prints 2 A slight difference is calling in programming language.
6th Apr 2020, 2:16 PM
Jayakrishna ๐ฎ๐ณ
+ 1
Iyad Ahmed that was not my question.Though thanks for your comment. โบ
8th Apr 2020, 11:16 AM
0
thanks all for the help โบ
8th Apr 2020, 7:20 AM