JAva入力年その年のカレンダーを印刷する

853 ワード

import java.util.Scanner;
public class rili {
	public static void main(String[] args ){
		System.out.print("\t\t\t     
"); System.out.print(" "); Scanner yy = new Scanner(System.in); @SuppressWarnings("unused") int type=yy.nextInt(); String answer=""; int monthday; boolean pingyear; int year=0 ; do{ if(year%4==0&&year%100!=0||year%400==0){ pingyear=false; }else pingyear=true; int sumyearday=0,i=1900; do{int x;if(i%4==0&&i%100!=0||i%400==0) {x=366;} else{x=365;} sumyearday=sumyearday+x;i++; }while(i