LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-06-2005, 10:17 PM   #1
rblampain
Senior Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 11
Posts: 1,289

Rep: Reputation: 52
math division in javascript


Is there a way to divide a number and find if there is a remainder in Javascript?
User enters a year that's divided by 4 to find if year is bissextile (leap-year).
Or is there another way?

Thank you for your help.
 
Old 09-06-2005, 10:27 PM   #2
pnellesen
Member
 
Registered: Oct 2004
Location: Missouri, USA
Distribution: Slackware 12.2, Xubuntu 9.10
Posts: 371

Rep: Reputation: 31
try the following

var rmndr = a%b
 
Old 09-07-2005, 04:07 AM   #3
rblampain
Senior Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 11
Posts: 1,289

Original Poster
Rep: Reputation: 52
That did the job. Thank you.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
math.h Damicles Programming 9 12-04-2010 05:51 AM
bash and math division problem bennethos Programming 5 10-17-2004 01:51 PM
ip address class division emailssent Linux - Networking 3 10-08-2004 06:38 AM
Eek! Python truncate division question. johnMG Programming 3 07-16-2004 01:44 PM
math.h is empty ?? niac Programming 1 11-12-2002 01:10 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration