• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calculator %

 
Gary Ba
Ranch Hand
Posts: 161
Firefox Browser Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am not sure what forum to ask this question. I am looking at creating a calculator (I actually started) as my small project. And I see that a typical calculator, one from windows (Calculator), has a % function. I wonder if anyone knows what that means? I tried playing around with it and did a bit searching online but no luck.

Thank you in advance,
Gary
 
Raymond Tong
Ranch Hand
Posts: 255
2
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gary Ba wrote:Hi All,
I am not sure what forum to ask this question. I am looking at creating a calculator (I actually started) as my small project. And I see that a typical calculator, one from windows (Calculator), has a % function. I wonder if anyone knows what that means? I tried playing around with it and did a bit searching online but no luck.

Thank you in advance,
Gary

The "%" function means "percent".
So if you type 1 * 5 %, it will interpret as 1 * 0.05.
If you type 5 %, it will just give you 0.
 
Gary Ba
Ranch Hand
Posts: 161
Firefox Browser Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Raymond!!

Gary
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And if you use % in java it means Modulus
 
Wouter Oet
Saloon Keeper
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also known as the remainder operator.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic