Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool podzielnosc7 (int liczba){
- int suma=0;
- int i=1;
- while (liczba>0){
- if (i%2==1)
- suma=suma+liczba%1000;
- else
- suma=suma-liczba%1000;
- liczba=liczba/1000;
- i++;
- }
- if(suma%7==0)
- return true;
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement