ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 09 May 2017 My Price 9.00

COM S 207Triangle Pattern

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.

Answers

(11)
Status NEW Posted 09 May 2017 05:05 AM My Price 9.00

-----------

Not Rated(0)