Home
About Us
Privacy Policy
Terms and Conditions
Copyright
Contact Us
Register
Sign In
Search
Questions
maharshiguin100
@maharshiguin100
June 2021
1
150
Report
How can i print the letter 'M' and 'G' in star pattern in java using loops or other such method ?
Answers & Comments
Shivaya1
Class CharPattern1 { public static void main(String[] args) { char ch = 'A'; for (int i = 1; i <= 5; i++) { for (int j = 1; j <= i; j++) { System.out.print(ch); ch++; } System.out.println(); } }} import java.util.Scanner; public class CharPattern2 { public static void main(String[] args) { System.out.println("Enter a String: "); Scanner sc = new Scanner(System.in); String s = sc.nextLine(); sc.close(); char [] a=s.toCharArray(); for (int i = 0; i < a.length; i++) { for (int j = 0; j <= i; j++) { System.out.print(a[j]); } System.out.println(); } } }
2 votes
Thanks 0
Add an Answer
Please enter comments
Please enter your name.
Please enter the correct email address.
Agree to
terms of service
You must agree before submitting.
Send
More Questions From This User
See All
maharshiguin100
August 2021 | 0 Replies
15 points differentiate y with respect to x
Answer
maharshiguin100
August 2021 | 0 Replies
15 pointsdifferentiate y with respect to x
Answer
maharshiguin100
August 2021 | 0 Replies
find x answer asapwill report if you write anything out of context
Answer
maharshiguin100
July 2021 | 0 Replies
An electric charge q moving with a constant velocity v enters perpendicularly in...
Answer
maharshiguin100
July 2021 | 0 Replies
what is soil fragmentation ???...
Answer
maharshiguin100
May 2021 | 0 Replies
An electric charge q moving with a constant velocity v enters perpendicularly in...
Answer
maharshiguin100
May 2021 | 0 Replies
30 points answer with explaination no spam
Answer
Recommend Questions
normaica19
November 2022 | 0 Replies
pasagot ngayon na ito ipapasa please
faithvalerieturno
November 2022 | 0 Replies
how do early beliefs about constellations effect human culture
Muning1027
November 2022 | 0 Replies
yung tama po pls kailangan ko na bukas na talaga po submit ng modules ko
neshthmd
November 2022 | 0 Replies
is a disease causing organism that lives in humans or other animals and derives ...
gamboelise83
November 2022 | 0 Replies
or directionbf361c2d468f8ffa07252b7f7f4e2a8d 39180
laimarnisle
November 2022 | 0 Replies
What are the possible solution that may help the preservation of our flora and f...
duermejhonber
November 2022 | 0 Replies
why are there differrence between the colling rates of sand and water
namronlamoste24
November 2022 | 0 Replies
supernova elements form...
princeclarkcasipe30
November 2022 | 0 Replies
It is responsible for the extractions og energy from the food we eat...
faderonprincessmae
November 2022 | 0 Replies
please help me if you help me i will follow you
×
Report "How can i print the letter 'M' and 'G' in star pattern in java using loops or ot..."
Your name
Email
Reason
-Select Reason-
Pornographic
Defamatory
Illegal/Unlawful
Spam
Other Terms Of Service Violation
File a copyright complaint
Description
Helpful Links
About Us
Privacy Policy
Terms and Conditions
Copyright
Contact Us
Helpful Social
Get monthly updates
Submit
Copyright © 2024 EHUB.TIPS team's - All rights reserved.
Answers & Comments