Design a for loop that gets six integer numbers from a user

Assignment Help Programming Languages
Reference no: EM131274146

Programming Assignment

1. Design a for loop that gets 6 integer numbers from a user, accumulates the total of them, then displays the accumulated total to the user. Just write the code segment to show what is asked, not a complete program. however, declare any variables that you need to use. Use a semicolon (;) at the end of each line of code so I can tell when you use a new line in your code.

2. Design a while loop to get a series of numbers from a user; the loop stops when the user enters a negative number. For each number the user enters, the number is multiplied by 5 then the product is displayed on the screen. Be sure to declare the variables that you will use; include the code needed to prompt the user and the code segment needed for the loop to work without error; and, place a semicolon at the end of each line of your code so I can easily read it.

3. Write the pseudocode for a function definition that is named toOunces. The function is to accept an argument from the calling module for the number of pounds (as real data type). The function is to change the number of pounds sent to total number of ounces in the pounds. The function returns the number of ounces calculated.

4.Write a single pseudocode statement that calls a function named calcTax and assigns the return value to a variable named taxAmount. The statement also sends two arguments: a sales amount of $1,248.50 as the first argument and a rate of .0775 as the second argument.

Reference no: EM131274146

Questions Cloud

Incident response strategic decisions : Suppose that you have been alerted of a potential incident involving a suspected worm spreading via buffer overflow techniques, compromising Microsoft IIS Web servers. As the IR Team leader, it is your responsibility to determine the next steps.
What was the research hypothesis : Each student will select two (2) peer-reviewed journal articles and utilize the Publication Manual of the American Psychological Association (2012) to correctly cite and summarize the information in the following format: What was the researc..
Discuss about the risk of sudden infant death syndrome : risk of developing sudden infant death syndrome (SIDS).
Display the wind chill temperature index : Write a Python program to display the wind chill temperature index. First perform the appropriate calculations and display the corresponding wind chill temperature index:
Design a for loop that gets six integer numbers from a user : Design a for loop that gets 6 integer numbers from a user, accumulates the total of them, then displays the accumulated total to the user. Just write the code segment to show what is asked, not a complete program.
Problem regarding the four-node internet : To understand how the distance vector algorithm in Table 20.1 works, let us apply it to a four-node internet as shown in Figure 20.32. Assume that all nodes are initialized first. Also assume that the algorithm is applied, one at a time, to each n..
What were the main results for each study : What experimental question did this article raise for you? That is, if you were going to conduct an experiment on the topic of this article using it as background information, what question would you want to explore? Briefly describe how you would..
Difference between the external and internal fragmentation : Discuss the difference between external and internal fragmentation. Which page-replacement strategy incurs more execution overhead: least recent used (LRU) or least frequently used (LFU)?
Examples of projects that suffered from scope creep : Perform some outside research and find  two examples of  projects that  suffered from scope creep. Try to determine why they suffered scope creep. Use specific actions, tools, or techniques discussed in this chapter that could have helped prevent ..

Reviews

Write a Review

Programming Languages Questions & Answers

  Create logic for program-continously prompts for numeric

Create the logic for a program that continously prompts the user for two numeric values that represent the sides of a rectangle.

  Identify a list of function/menus that need to be test

The task is to use Equivalence Class partitioning and Boundary Value Analysis (which means to test the input at the boundary of the equivalence class partition) to analyze the valid and invalid inputs for Microsoft WinWord or any other software pa..

  Investigate two free and two fee-based options.

Include any personal experience you may have publishing a Web site. Investigate two free and two fee-based options.

  What is the difference between realloc

What is the Difference between realloc() and free() in C++?

  Pseudocode to read in data file containing student names

Read in a data file containing student names, ID number, and gender into an array. Print the contents of each record using the array.

  Return boolean value true if string in array is palindrome

Write the recursive method testPalindrome which returns boolean value true if string stored in array is palindrome and false otherwise. Method must ignore spaces and punctuation in string.

  Create class to calculate perimeter and area rectangle

Create class Rectangle. The class has attributes length and width, each of which defaults to 1. It has read-only properties that calculate the Perimeter and the Area of the rectangle.

  Sketch state diagram for machine using sw

Sketch the State Diagram for machine using any SW (i.e. MS Visio).: Print out your VHDL Code and Simulation waveforms for you design 3 Points: Print out your VHDL Code for your self-checking Test Bench

  Calculate and display optimal cost for cylindrical container

Compute and display the height and cost of container. Use the following formulas, where V is volume, r is radius, h is the height, and C is the cost.

  Describe purpose of keyword super in programs

Describe purpose of keyword 'super' in programs

  Program that uses for loop prompt user to input two integers

Write a program that uses for loop to preform the following steps: Prompt the user to input two integers: firstnum and secondnum.

  Design a program that will allow a user to input

Demonstrates your thought process and steps used to analyze the problem. Be sure to include the required input and output and how you will obtain the required output from the given input?

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