为什么我这个一直显示编译错误?自己运行都没毛病啊

P1000 超级玛丽游戏

yorb @ 2023-09-11 23:37:58

public class Test{
    public static void main(String[] args){
          System.out.println("                 ********");
          System.out.println("                ************"); 
          System.out.println("                ####....#.");
          System.out.println("              #..###.....##....");
          System.out.println("              ###.......######              ###           ###");
          System.out.println("                ...........                #...#         #...#");
          System.out.println("               ##*#######                  #.#.#         #.#.#");
          System.out.println("            ####*******######              #.#.#         #.#.#");
          System.out.println("           ...#***.****.*###....           #...#         #...#");
          System.out.println("           ....**********##.....            ###           ###");
          System.out.println("           ....****    *****...."); 
          System.out.println("             ####        ####");
          System.out.println("           ######        ######");
          System.out.println("##############################################################");
          System.out.println("#...#......#.##...#......#.##...#......#.##------------------#");
          System.out.println("###########################################------------------#"); 
          System.out.println("#..#....#....##..#....#....##..#....#....#####################");
          System.out.println("##########################################    #----------#");
          System.out.println("#.....#......##.....#......##.....#......#    #----------#");
          System.out.println("##########################################    #----------#");
          System.out.println("#.#..#....#..##.#..#....#..##.#..#....#..#    #----------#");
          System.out.println("##########################################    ############");
}
}

by Argvchs @ 2023-09-11 23:59:41

@yorb public class Main


by yorb @ 2023-09-12 07:19:49

@Argvchs 多谢大佬!改了之后能编译了,又显示wa,但我用cmd运行结果是和题目一样的,请问这是为什么呢```java public class Main{ public static void main(String[] args){ System.out.println(" ****"); System.out.println(" ****"); System.out.println(" ####....#."); System.out.println(" #..###.....##...."); System.out.println(" ###.......###### ### ###"); System.out.println(" ........... #...# #...#"); System.out.println(" ##*####### #.#.# #.#.#"); System.out.println(" ####****###### #.#.# #.#.#"); System.out.println(" ...#..*###.... #...# #...#"); System.out.println(" ....**##..... ### ###"); System.out.println(" ....*** ...."); System.out.println(" #### ####"); System.out.println(" ###### ######"); System.out.println("##############################################################"); System.out.println("#...#......#.##...#......#.##...#......#.##------------------#"); System.out.println("###########################################------------------#"); System.out.println("#..#....#....##..#....#....##..#....#....#####################"); System.out.println("########################################## #----------#"); System.out.println("#.....#......##.....#......##.....#......# #----------#"); System.out.println("########################################## #----------#"); System.out.println("#.#..#....#..##.#..#....#..##.#..#....#..# #----------#"); System.out.println("########################################## ############"); } }


by AlexandreLea @ 2023-09-12 08:28:05

@yorb 冒昧的问一句,你能先修一下你的markdown吗


by yorb @ 2023-09-12 20:10:52

@Jasminoides 能问下这个咋修吗,我刚开始学,很多地方不太明白


by AlexandreLea @ 2023-09-12 20:13:40

@yorb 代码上边下边加上 ```。


by AlexandreLea @ 2023-09-12 20:14:07

@yorb 并且加上换行。


by AlexandreLea @ 2023-09-12 20:19:59

@yorb 兄啊,你的输出里面有五行出了问题

至于在哪里我也不知道

把画复制下来吧,或者别做这个了,毕竟又不会有实质性的东西。


by yorb @ 2023-09-12 20:32:22

@Jasminoides 多谢提醒,我就先去学学其他的了


by proudt @ 2023-09-23 14:05:31

@yorb 用cout<<;


by zhoujunchen @ 2023-10-06 09:08:33

@proudt 关于java里有cout这事...


| 下一页