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:
- $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";
- }
- ?>

Sandeep BanerjeePosted Nov 13, 2017, 1:46 AM
Khaja MoizuddinPosted Nov 12, 2017, 8:00 AM