Computer Science, asked by Anonymous, 2 months ago


[ tex ]\huge\purple{\mathbb{Hello}}[/tex]


ᴄʀᴇᴀᴛᴇ ᴊᴀᴠᴀ ᴘʀᴏɢʀᴀᴍᴍᴇ

sᴛᴀʀ ᴘᴀᴛᴛᴇʀɴ.

ᴋɪɴᴅʟʏ ɴᴏ sᴘᴀᴍ ​

Answers

Answered by purveshKolhe
5

import java.util.Scanner;

public class Program{

static void outer(int i,int rows){

if(i<=rows){

inner(1,i);

System.out.println();

outer(i+1,rows);

}

}

static void inner(int j,int i){

if(j<=i){

System.out.print("* ");

inner(j+1,i);

}

}

public static void main(String[] args) {

int rows=(new Scanner(System.in)).nextInt();

// now it is ok

outer(1,rows);

}

}

Answered by parakkalsivadasan195
1

Answer:

[ tex ]\huge\purple{\mathbb{ Hello}} [/tex] ᴄʀᴇᴀᴛᴇ ᴊᴀᴠᴀ ᴘʀᴏɢʀᴀᴍᴍᴇ sᴛᴀʀ ᴘᴀᴛᴛᴇʀɴ.

Similar questions