
package Week01_Operator;
import java.util.Scanner;
public class Main1_HW1_Cooking_recipe1_2 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String title = sc.nextLine();
float rate = sc.nextFloat();
String input1 = sc.nextLine();
String input2 = sc.nextLine();
String input3 = sc.nextLine();
String input4 = sc.nextLine();
String input5 = sc.nextLine();
String input6 = sc.nextLine();
String input7 = sc.nextLine();
String input8 = sc.nextLine();
String input9 = sc.nextLine();
String input10 = sc.nextLine();
String input11 = sc.nextLine();
String input12 = sc.nextLine();
String input13 = sc.nextLine();
String input14 = sc.nextLine();
title = "♡" + title + "♡";
int intRate = (int)rate;
float percent = intRate * 100 / 5;
System.out.println(title);
System.out.println("별점 : " + intRate + " (" + percent + "%)");
System.out.println("1." + input1);
System.out.println("2." + input2);
System.out.println("3." + input3);
System.out.println("4." + input4);
System.out.println("5." + input5);
System.out.println("6." + input6);
System.out.println("7." + input7);
System.out.println("8." + input8);
System.out.println("9." + input9);
System.out.println("10." + input10);
System.out.println("11." + input11);
System.out.println("12." + input12);
System.out.println("13." + input13);
System.out.println("14." + input14);
}
}
이렇게 작성해서 타이틀, 별점, 레시피 내용 순서대로 적어가는데, 14번째 까지 입력해야하는데 자꼬 13번째 줄 작성하고 엔터치면, 출력값이 나와버려요.
보니까 1. 줄이 입력안되고 아래로 밀리더라고요.
"원래 베이컨 구워줍니다." 가 13.에 나왔어야 되고 그 다음 한 줄 더 입력하면 나와야 되요.
문제가 뭔지 모르겠어서 과제 정답코드도 복사해서 실행해봤는데
이것도 1. 줄이 밀리더라고요.
도와주세요!
