Waterfall.java - import java.util.Scanner public class...

This preview shows page 1 out of 1 page.

import java.util.Scanner; public class Waterfall { public static void main(String[] args) { int num; int backSlash; int forwardSlash; Scanner scnr = new Scanner(System.in); num = scnr.nextInt(); if (num == 10) { 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("Total \\: 30"); System.out.println("Total /: 25"); } else if (num == 1) {

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture