we get month for (month=days/30;) years for ( years=month/12;) but we also get days for(( days=days%30, why it happend explain ??))

Recommended Answers

All 3 Replies

Do you like to know something about the div and mod operators?
Does the word please means anything to you?

Also, please avoid duplicate posts. Your question (?) has already been answered in your other post.

Here is the explanation you seek, which by the way was just a real simple Google search for "modulus division".

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.