Question: follow the main.java below Implement the recursive function such that creates an unfilled triangle with the base of the number inputted by the user as

follow the main.java below

Implement the recursive function such that creates an unfilled triangle with the base of the number inputted by the user as shown at the link at the bottom. Notice that the spaces inbetween the stars start on the 3rd row asterix and the bottom row is always filled with the number the user inputs.

MAIN.JAVA BELOW

import java.util.Scanner;

class main {

public static void main(String[] args) {

Scanner myObj = new Scanner(System.in); // Create a Scanner object

System.out.println("Enter number for triangle recurse");

int number = myObj.nextInt(); // Read user input

//Figure out the recursion

}

static void triangleRecurse()

{

}

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!