subject

Write a program that asks the user to enter the size of a triangle (an integer from 1 to 50). Display the triangle by writing lines of asterisks. The first line will have one asterisk, the next two, and so on, with each line having one more asterisk than the previous line, up to the number entered by the user. On the next line write one fewer asterisk and continue by decreasing the number of asterisks by 1 for each successive line until only one asterisk in displayed. (Hint: Use nested loops; the outside loop controls the number of lines to write, and the inside loop controls the number of asterisks to display on a line. Complete the program by solving the upper triangle followed by the lower triangle.)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 05:30
Sally is editing her science report about living things. she needs to copy a paragraph from her original report. order the steps sally needs to do to copy the text to her new document.
Answers: 1
question
Computers and Technology, 24.06.2019 07:30
John recently worked on a project about various programming languages. he learned that though procedural language programs are useful, they have disadvantages too. what is a disadvantage of programs written in procedural languages? a. programs do not represent data complexity. b. programs take more time to execute. c. programs are prone to security threats. d. programs do not interface with multiple platforms.
Answers: 3
question
Computers and Technology, 25.06.2019 09:20
Problem 3: (hand) write the member function implementations for the class hand, which simulates a hand of 2 cards, into the file hand.cpp. the relative strength of 2 hands are determined by the following rules: • a pair (two cards of the same number) is the strongest hand. • two cards of the same suit is the next strongest hand. • two cards of different numbers and suits is the weakest hand. • within the same kind of hands, the stronger hand is determined by the larger number. • if two hands are of the same kind and the larger numbers are the same, the stronger hand is given by the hand whose smaller number is larger. • if all above fails, the two hands are of equal strength. i.e., all suits are of equal strength. • 2 is the weakest number. an ace is stronger than a king. you are using a single deck of cards. so a hand of a♥a♥ is impossible. here are some examples:
Answers: 3
question
Computers and Technology, 25.06.2019 09:30
If a business owner wanted to create a banner ad for his business on his webpage, he could use java programming to develop a (n) spreadsheet cad software applet music application
Answers: 1
You know the right answer?
Write a program that asks the user to enter the size of a triangle (an integer from 1 to 50). Displa...
Questions
question
Mathematics, 20.05.2021 23:50
question
Mathematics, 20.05.2021 23:50
question
Mathematics, 20.05.2021 23:50
question
English, 20.05.2021 23:50
question
English, 20.05.2021 23:50
question
Mathematics, 20.05.2021 23:50
question
Mathematics, 20.05.2021 23:50