Write a program that reads some number of integers

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

Question: 1. Find the Minimum and Maximum of a List of Numbers: 10 points

File: find_min_max.cpp

Write a program that reads some number of integers from the user and finds the minimum and maximum numbers in this list. The first number denotes number of cases. The input for each case begins with the number of integers in the list being entered followed by the list of integers. Your program should read in this list into a fixed size array of 256 elements (the input will not contain more numbers) and find the minimum and maximum values and print them back out.

2. Password Strength Calculator: 30 points

File: password_strength_calculator.cpp

Write a program that takes a password (a string of characters without spaces), and outputs how strong the password is. The password strength must be calculated in a function called by main.

Start with a base strength which is the length of the password then apply the following rules:

1. If the password contains at least one lowercase character between a and z, add 1 to the strength.

2. If the password contains at least one uppercase character between A and Z, add 1 to the strength.

3. If the password contains at least one numeric character between 0 and 9, add 1 to the strength.

4. If the password contains at least one punctuation character, add 2 to the strength. A punctuation character is one for which the function std::ispunct in <cctype> returns true.

To compute the final strength apply the following method:

If more than one rule is satisfied then double the strength for each extra rule. For example, satisfying 2 rules will multiply the strength by 2, satisfying 3 rules will multiply strength by 4 and so on.

Output the final strength for the password.

3. Reverse a Number: 30 points

File: reverse_a_number.cpp

Write a function that will reverse an integer (with the signature given). Your function should take an int as input and return the reversed int. For each case you'll read an int from std::cin and should use your function to reverse it and print the result. You can assume the input number will always be in the range of the type int, however you cannot assume all inputs to your program will be ints. Your function should not call any std:: functions to convert an integer to a string or vice versa.

Your program must be robust against bad input, any input that's not a positive number should result in ‘Invalid input' being printed instead of trying to reverse the bad input. Revisit the I/O examples from class 9 if you need a refresher on recovering from bad input.

Information related to above question is enclosed below:

Attachment:- homework3.rar

Reference no: EM132121829

Questions Cloud

What are the aspects of operations management : There are three aspects of operations management; structural, functional and environmental aspects. Structural aspect entails the transformation of products.
Social and cultural aspects of communication within teams : MGT105 - Business Communication - emphasising what you have found through your research are the most important aspects to define differences or similarities
Discuss how auditor independence might impact audit quality : ACC301 Auditing Research Essay Assignment, Australian Institute of Higher Education. Outline and discuss how auditor's independence might impact 'audit quality'
How to implement the requirements for a particular operation : Operations management involves various activities, such as process design, selection, management of information technology, work systems, planning
Write a program that reads some number of integers : Write a program that reads some number of integers from the user and finds the minimum and maximum numbers in this list. The first number denotes number.
Consumers the right to cancel certain contracts : Some states give consumers the right to cancel certain contracts for any reason within a short period of time after entering into them.
Significant attribute of many religions and philosophies : Compassion is a significant attribute of many religions and philosophies, including a Christian worldview, as well as being important for both authentic.
Constructed to best achieve stinson county goals : Determine how many of each type of facility should be constructed to best achieve Stinson County’s goals.
Goat for its agility in wide variety of harsh environments : Robin Scherbatsky owns a company that produces an all-terrain vehicle (ATV) nicknamed “The Goat” for its agility in a wide variety of harsh environments.

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