Question: crire un programme en java qui affiche un triangle compos des caractres O et X partir dune valeur (Vous la nommerez n) saisie par lutilisateur.

crire un programme en java qui affiche un triangle compos des caractres O et X partir dune valeur (Vous la
nommerez n) saisie par lutilisateur.
Par exemple, si lutilisateur saisit 3, votre programme doit afficher :
O OX O XO
Si lutilisateur saisit 5, votre programme doit afficher :
O
OX
O XO
O XO X O X O XO
English:
 
Write a program in java that displays a triangle composed of the characters O and X from a value (You name n) user input. For example, if the user enters 3, your program should display: OOX OOXO If the user enters 5, your program should display: O OX O XO O XO X O X O XO

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!