The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
This is java programming, actually I dont know how to write down codeÂ
COM S 207Triangle PatternWrite a program that reads in lines from the input.Each line has a single integer followed by a singlecharacter. The objective is to print a triangle pattern usingthe input character. The first integer represents the number of rows of the triangle.Input values will contain only integers greater than or equal to 1 and less than or equal to 50.InputThe format of an input line isnoRows charThe first is an integer (and can be read using nextInt()).The last one is a single character (like *) and can be read using next() as a String and then using charAt(0) toget at the first chara
sting of several rows. If the no of rows is less than orequal to zero or more than 50, the program prints out an error statement as shown in the sample output.Sample Input2 *-1 '10 =Sample Output***error in input=======================================================HINT1.use in.next().charAt(0) to get the character.2.don’t forget to discard the rest of the input line using in.nextLine() ifyou are using in.hasNextLine() to check if there is a next line.3.You will need two loops for this one as well.