write a program to print the following pattern of blue j. please give me the correct answer my exams are near .
Attachments:
Answers
Answered by
6
Answer:
This can be solved using charAt( )
______________
Note:-
- charAt() is used for extracting the charter at a particular position(here,index of string)
- String index starts from 0 to n-1 where n is the no. of characters. This is the reason why loop is starting from 0.
- print() will print in same lines
- println() will print in different lines
________
Variable Description:-
- str:- to store string data
- i:- loop variable
- j:- loop variable
_
•Output Attached
Attachments:
Answered by
6
Attachments:
Similar questions