subject
Computers and Technology, 18.03.2021 01:50 ugum

Write a program which takes an integer input, n, from the user and prints a rectangle with a height of n by printing asterisks inside a for loop. You can set the other side of the rectangle 10 for simplicity. So, your program should print 10 asterisks at the top, 10 asterisks at the bottom, two asterisks each side for other cases so that inside the rectangle can be empty. You can achieve this by using if statements inside a for loop. Here are some three sample runs with n values, 5, 6, and 8.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:00
Stacy works as blank. the most important soft skill she needs for this role is blank.
Answers: 3
question
Computers and Technology, 22.06.2019 20:10
Assume the existence of a bankaccount class. define a derived class, savingsaccount that contains two instance variables: the first a double, named interestrate, and the second an integer named interesttype. the value of the interesttype variable can be 1 for simple interest and 2 for compound interest. there is also a constructor that accepts two parameters: a double that is used to initialize the interestrate variable, and a string that you may assume will contain either "simple", or "compound", and which should be used to initialize the interesttype variable appropriately. there should also be a pair of functions getinterestrate and getinteresttype that return the values of the corresponding data members (as double and int respectively).
Answers: 2
question
Computers and Technology, 23.06.2019 07:50
Apython programming question: assume s is a string of lower case characters. write a program that prints the number of times the string 'bob' occurs in s. for example, if s = 'azcbobobegghakl', then your program should print number of times bob occurs is: 2
Answers: 3
question
Computers and Technology, 24.06.2019 09:50
Suppose you are an ad-serving company and you maintain a log of cookie data for ads you serve to the web pages for a particular vendor (say amazon). a. how can you use this data to determine which are the best ads? b. how can you use this data to determine which are the best ad formats? c. how could you records of past ads and ad clicks to determine which ads to send to a given ip address? d. how could you use this data to determine how well the technique you used in your answer to part c was working? e. how could you use this data to determine that a given ip address is used by more than one person? f. how does having this data give you a competitive advantage vis-à-vis other ad-serving companies?
Answers: 2
You know the right answer?
Write a program which takes an integer input, n, from the user and prints a rectangle with a height...
Questions
question
Mathematics, 24.02.2020 05:13
question
Mathematics, 24.02.2020 05:13
question
Social Studies, 24.02.2020 05:13
Questions on the website: 13722363