Write a program that reads an initial investment balance

Assignment Help Programming Languages
Reference no: EM131142573

R7.1 Carry out the following tasks with an array:

a. Allocate an array a of ten integers.
b. Put the number 17 as the initial element of the array.
c. Put the number 29 as the last element of the array.
d. Fill the remaining elements with -1.
e. Add 1 to each element of the array.
f. Print all elements of the array, one per line.
g. Print all elements of the array in a single line, separated by commas.

R7.2 What is an index of an array? What are the legal index values? What is a bounds error?

R7.4 Write a loop that reads ten numbers and a second loop that displays them in the opposite order from which they were entered.

P7.1 A run is a sequence of adjacent repeated values. Write a program that generates a sequence of 20 random die tosses in an array and that prints the die values, marking the runs by including them in parentheses, like this:

12 (5 5) 3 1 2 4 3 (2 2 2 2) 36 (5 5) 631

Use the following pseudocode:

Set a boolean variable inRun to false.
for each valid index i in the array
If inRun
If values[i] is different from the preceding value
Print ).
inRun = false.
If not inRun
If values[i] is the same as the following value
Print
inRun = true.
Print values[i].
If inRun, print ).

1. For a given number, print a pyramid of that many levels. We've covered how to print out half of the pyramid similar to the following:
*
**
***
****
*****

Now we want to print (notice the spacing)

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

2. Write a program that lists the first 400 multiples of 13. List that number, followed by whether it is even or odd.

3. Write a program that adds a letter to a string until the user wants to quit.

4. Write a program that reads an initial investment balance and an interest rate. Then print the number of years it takes for the investment to reach one million dollars.

Reference no: EM131142573

Questions Cloud

Determine the grade of the road : Assuming standard perception/reaction time and practical stopping distance, determine the grade of the road.
Why do you suppose 131 53 i is used for this treatment : The radiation emitted by the source can destroy cancerous cells. Why do you suppose 131 53 I is used for this treatment?
Determine the drivers perception : Determine the drivers perception/reaction time before and after drinking - the driver fails to stop in time and strikes the object at a speed of 30 mi/h.
Which has the greatest penetration into tissue : Of the three basic types of radioaction-alpha, beta, and gamma-which has the greatest penetration into tissue? Explain the rationale behind your answer.
Write a program that reads an initial investment balance : Write a program that reads an initial investment balance and an interest rate. Then print the number of years it takes for the investment to reach one million dollars.
Find the decay constant and half-life of the isotope : A freshly prepared sample of a certain radioactive isotope has an activity of 10 mCi. After 4 h, the activity is 8 mCi.
What is the maximum acceleration from rest : What is the maximum acceleration from rest of this car on this test track?
Discuss how some tax systems place a double tax on saving : 1. Discuss the way that saving is taxed under an income tax and a consumption tax. Which is more efficient? Why? Which is more equitable? Why? In your explanation, be sure to discuss how some tax systems place a double tax on saving.
Which treatments are proving to be successful and why : What are the primary challenges of sex offender treatment programs? Which treatments are proving to be successful and why

Reviews

Write a Review

Programming Languages Questions & Answers

  Identify where each security application or countermeasure

Briefly describe each of the listed network security applications and security countermeasures. Identify where each security application or countermeasure is located within the seven domains of a typical IT infrastructure.

  Create visual basic windows application

Create Visual Basic Windows application. Use following names for solution and project, respectively: Raise Solution and Raise Project.

  Create a college course to display the course data

Create a CollegeCourse that does not include the lab fee. Then display the course data. Save the files as CollegeCourse.java, LabCourse.java, and UseCourse.java.

  Extend the user management

Extend the user management so that user can be stored in database - user can be administrator and he can access that admin page

  Create and implement application which reads integer value

Create and implement application which reads the integer value representing a number grade. purpose of the program is to determine corresponding letter grade based on the following grade policy table

  Designing system to handle donations of non-profit agency

You have been hired by worldwide non-profit agency to create a system to handle their donations.

  Prompt the user to enter the price for apple

C program: Grocery Checkout total. Implement the pseudocode developed in Week 2. Insert meaningful comments at least once for every few lines of the program.

  Creating application to test class rectangle

Write down application to test class Rectangle.

  Write methods for calculating maximum value of array

Write down the methods for calculating maximum value, minimum value, and mean value of array. Use these methods to calculate and display minimum of array.

  Compare and contrast object-oriented languages

Compare and contrast object-oriented languages (Java, C++, C#, etc.) to imperative languages (C, Pascal, etc.) in terms of: Programmability Maintainability Performance Development tools Explain the use of scripting languages, such as JavaScript, PHP,..

  Design employee objects-display each object-s yearly salary

Design two employee objects and display each object's yearly salary. Then provide each employee 10% raise and display each Employee's yearly salary again.

  Define two pointers that hold two values of type int

Define a one dimensional array consisting of five cells, and populate the cells with values 0-5 and then print the result of the one dimensional array on the screen.

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