我這哪錯了?
?System.out.print("您要開始第幾周學習啦,直接輸入數(shù)字吧:");
? ? ? ? //設置變量存儲接收到的數(shù)據(jù)
? ? ? ? int w=new Scanner(System.in).nextInt();
? ? ? ? //計算今天是幾月(1-月第一周、4-月第4周)
? ? ? ??
? ? ? ? int mouth=0;
? ? ? ? //計算輸入的周是這個月的第幾周
? ? ? ? if(w%4==0){
? ? ? ? ? ? mouth=w/4;
? ? ? ? }
? ? ? ??
? ? ? ? else{
? ? ? ? ? ? mouth=w/4+1;
? ? ? ? }
? ? ? ? //提示信息
? ? ? ? System.out.println("以下是您本月的學習計劃, √ 代表當周學習任務");
? ? ? ? System.out.println("=======================================");
? ? ? ??
? ? ? ? //利用for循環(huán),找到數(shù)組中對應這個月的內(nèi)容輸出
? ? ? ? ? ? //根據(jù)當前月第幾周,在輸出此行時,前面添加“√”
? ? ? ? ? ??
? ? ? ? ? ? for(int i=(mouth-1)*4;i<mouth*4;i++){
? ? ? ? ? ? ? ? if(1==(w-1)){
? ? ? ? ? ? ? ? ? ? System.out.println("√"+contentList[i]);?
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? else{
? ? ? ? ? ? ? ? ? System.out.println(contentList[i]);
? ? ? ? ? ? ? }??
? ? ? ? ? ? }
? ? ? ? ? ??
? ? ? ? ? ??
? ? }
? ??
? ??
2023-06-26
? if(1==(w-1))你這里是1還是i,應該是i才對