Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int x = Reader.nextInt();
- int count = 0;
- if(x==2){
- System.out.println(0);
- }
- else{
- for(int i = 3; i<=x; i++){
- if(i%3 == 0){
- count++;
- }
- }
- System.out.println(count);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement