Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Projekt {
- public static void main(String[] args) {
- int chislo = 0;
- int chetchik = 0;
- char sim = '5';
- while(true){
- System.out.print(chislo + " ");
- String str = Integer.toString(chislo);
- int kol = str.length();
- for (int i = 0; i < kol; i++){
- if (str.charAt(i) == sim) chetchik = chetchik + 1;
- }
- chislo = chislo - 5;
- if (chetchik > 1) break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement