Write a program that asks the user to enter an integer

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

Program

Write a program that asks the user to enter an integer between 1 and 15. If the number entered is outside that range, your program should print out an error message and re-prompt for another number. (This is an opportunity to write an input validation loop.)

Once the user enters a number in the correct range, your program will print out four patterns of asterisks that look like the following. Note that the number provided by the user is equal to the height of the pattern.

Example- If the input value is 5, please print the following four patterns:

* * * * *

* * * *

* * *

* *

*

* * * * *

* * * *

* * *

* *

*

 

*

* * *

* * * * *

* * * * * * *

* * * * * * * * *

*

* *

* *

* *

* * * * * * * * *

As you can see, the input value represents the height of the triangle.

Your program should only print one asterisk at a time and use loops to control the number of asterisks printed per line.

Reference no: EM132106313

Questions Cloud

School administrators that may affect collaboration : What are three practical issues faced by teachers and school administrators that may affect collaboration?
How a single process creates a child process : Both parent and child processes interact with each other through shared memory-based communication scheme or message passing scheme.
Terminate and return the status code of the number : In the parent, Program 1 will read from standard input pairs of integers and writes the sum and difference of the integers to the pipe.
Write a program that ask the user to type ten integers : Write a program in c++ that ask the user to type 10 integers of an array and an integer value X, the program must put the value X in the index 0.
Write a program that asks the user to enter an integer : Write a program that asks the user to enter an integer between 1 and 15. If the number entered is outside that range, your program should print out.
Quasi-single case designs fitting into clinical practice : How do you see the information on small group and quasi-single case designs fitting into clinical practice?
Write a program to produce a cross table : Write a program to produce a cross table. This table should be built from a single int8 value provided by the user.
Sigmund freud and karen horney : What is the main sticking point between the theories of Sigmund Freud and Karen Horney? How are their theories alike? Which do you agree with, if either?
Type of diagnoses for the same person : Sometimes many different psychologists come up with different type of diagnoses for the same person. How these different psychologists

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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