Write a program to check the number

Assignment Help C/C++ Programming
Reference no: EM13859820

Assignment 1

Write a program that asks the user to enter an integer from 1 to 50 (make sure to check that numbered entered is between 1 & 50). Displays an isosceles triangle by printing rows of asterisks, 1 asterisk on the first row, 2 on the second, etc., up to the number entered by the user. Then it decreases the number of asterisks by one per line back down to just one in the line printed.

Example: If user enters a 6

*
**
***
****
*****
******
*****
****
***
**
*

Use good programming techniques and prompt to run again.

 

Reference no: EM13859820

Questions Cloud

Planning to retire : Sam Musso is planning to retire in 20 years. He can deposit money at 8% compounded quarterly. What deposit must he make at the end of each quarter until he retires so that he can make a withdrawal of $45,000 semiannually over five years after his ret..
Is this efficient allocation : Alice has 10lbs of cheese and 12 bottles of wine while bill has 6lbs of cheese and 8 bottles of wine. Is this an efficient allocation? If no find a Preto superior allocation. Indicate the contract curve.
What would be the quantity supplied if a price floor is set : What is the answer Market for used cars Qd =154,000 -86 Psupply: Qs=-100 +14 P what would be the quantity supplied if a price floor is set at $2,00
Determining the bidding at a price : Realtor commissions would be $8,000 and upkeep costs, insurance, and property taxes for 3 months would total $2,000. The bank should open the bidding at a price of
Write a program to check the number : Write a program that asks the user to enter an integer from 1 to 50
Explain how a decrease in the interest rate will affect : 1) Explain how a decrease in the interest rate will affect investment.2) Considering the spending multiplier affect, assume the MPC is 0.90.  If autonomous investment increased by $500 billion, what would be the impact on real GDP?
View of responsibility for unemployment : Explain the relationship between one's beliefs about whether the minimum jobs program presented in the chapter actually solves the unemployment problem and one's normative view of responsibility for unemployment.
Urban community that exceeds the emissions standard : Assume that two power plants, Firm 1 and Firm 2, release arsenic in a small urban community that exceeds the emissions standard. To meet the standard, 40 units of SO2 must be abated in total. The two firms face the following abatement costs:
What are the pros and cons of a competitive market : 1) Assume a competitive market has firms earning large economic profits. What is expected to happen over time in this competitive market and to firm's profits?2) What are the pros and cons of a competitive market in the long run?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create a text adventure game that uses pointers

Create a text adventure game that uses pointers. You have a rich, eccentric Uncle Billy who is soon to be deceased.

  Write c++ program that reads in the average monthly rainfall

Write a C++ program that reads in the average monthly rainfall for a city for each month of the year and then reads in the actual monthly rainfall for each of the previous 12 months

  Calculate the cost of items before discount

Build a program that calculates a discount for items based on quantity bought - Calculate the cost of items before discount.

  Write a recursive method fibonacci that returns

Write a recursive method Fibonacci that returns the nth Fibonacci number when passed the argument n and Write a non-recursive version of the method Fibonacci.

  Write a program to create 100 real random numbers

Write a program to create 100 real random numbers and store it into a 1-D array.

  Implement a program for special atm machine

Association supplies the needy person with a pin number to be able to use the ATM machine - Implement a program for this machine. Your program must start by displaying a main menu.

  Object-oriented systems is the concept of object

At the heart of all object-oriented systems is the concept of an object. Simply stated, an object is a set of related characteristics and their associated actions.

  Write in c a program to continuously read the dip switches

Write in C a program to continuously read the DIP switches connected to PORTA and send it to PORTB. Assume that eight DIP switches are connected to PORTB and eight LEDs are connected to PORTC. Assume that the switch values are normally high. Turn a..

  Complete graphical and possibly networked two-player game

Analyze a basic set of requirements for a problem and create basic test cases for a program - Describe what is an attribute or data member of a class

  Generate a random number

Generate a random number between 1 – 5 and 3 – 8 for express and normal lanes, respectively. This represents the arrival time of the first customer into each lane. Set the variable for total time elapsed to 0.

  Define a 2-element array of characters

Write an if statement that sets the variable age to 21 when the flag variable adult is set and define a 2-element array of characters named alpha initialized with the characters P, Q.

  Create a two-dimensional array

Describe a problem where you might need to create a two-dimensional array to accurately model the data, and describe how you would use the data to help solve the problem.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd