Movatterモバイル変換


[0]ホーム

URL:


Skip to content
Search Gists
Sign in Sign up

Instantly share code, notes, and snippets.

@Joskipank
CreatedJuly 18, 2025 17:29
    • Star(0)You must be signed in to star a gist
    • Fork(0)You must be signed in to fork a gist
    Save Joskipank/69b7de83a5a287c3e6af4685b2c5eec0 to your computer and use it in GitHub Desktop.
    Java циклы
    import java.util.Scanner;
    public class Main {
    public static void main(String[] args) {
    for(int i = 1; i <= 2025; i++) {
    if (i % 4 == 0 && i % 100 != 0 || i % 400 == 0) {
    System.out.println("год весокосный " + i);
    } else {
    System.out.println("год не весокосный " + i);
    }
    }
    int health = 11;
    while(health > 0) {
    health--;
    if(health == 6){
    continue;
    } else if(health == 2){
    break;
    }
    System.out.println(health + "HP");
    }
    }
    }
    Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

    [8]ページ先頭

    ©2009-2025 Movatter.jp