TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sandeep Banerjee
NA
249
264.9k
unable to solve a prob
Nov 12 2017 5:33 AM
hi, Its a silly question but there is some issue in my calculation, as when i do
8535902775%10 it show -7 on my php compiler
however i expect as it shuold be 5 i know modulo thing as currently i am not able to find my istake my program is:
<?php
$isbn
=8535902775;
//{Write your code here
$array
=
'0'
;
for
(
$i
= 1;
$i
<=10;
$i
++){
$array
+=
$isbn
% 10;
$isbn
=
$isbn
/10;
$array
=
$array
*
$i
;
}
if
(
$array
/11 == 0){
echo
"Valid"
;
}
else
{
echo
"Not Valid"
;
}
?>
Reply
Answers (
2
)
Artificial intelligence
Visual Studio 2013 Timer C#