Calculate the sum of the numbers from one to n

Assignment Help Computer Engineering
Reference no: EM131855440

Problem

1. Write an assignment statement to calculate the sum of the numbers from 1 to N using Gauss's formula

Sum = [N(N + 1)] / 2

Store the result in the integer variable Sum.

2. The syntax error messages displayed by a compiler are sometimes confusing. In this exercise you will become more familiar with some of the common syntax error messages produced by your Ada compiler. Enter, compile, and run the program given in Programming Warm-up Exercise

3. Then make each of the following changes and compile the program and observe the syntax error message your compiler produces. Be sure to have only one of these errors in your program at a time. That is, undo each change before making the next one. (a) Leave out the context clause "with Ada.Text_IO;" (b) Substitute "procedre" for "procedure" (c) In the first assignment statement of the program, replace the underscore character in the variable Interest_Rate with a blank (d) Leave out the declaration of the variable Charge (e) Leave off the semicolon in the declaration of the variable Charge (f) Leave off the semicolon in the first executable statement (g) Use a value of 2.5 instead of 2 for an Aft parameter in one of the Put statements (h) Leave off "Ada.Text_IO." in one of the New_Line statements (i) Misspell the parameter name Aft in one of the Put statements.

Reference no: EM131855440

Questions Cloud

What are some major nonfinancial uncertainties : What are some major nonfinancial uncertainties that a company should consider when making decisions on where to source product?
Why is it important for nurses to understand concepts : Why is it important for nurses to understand these concepts?
Explain the complexity of this issue : Compare the benefits vs. the cost of this for both the buyer and the seller. What measurement for success would you recommend for this offer?
What is included in the term culture : What is included in the term "culture"? What are some attitudes that affect one's cultural competence?
Calculate the sum of the numbers from one to n : Write an assignment statement to calculate the sum of the numbers from 1 to N using Gauss's formula
What are major challenges and future trends : What are major challenges and future trends in both recruitment and retention policies and practices in HR? and recommend appropriate staffing models.
What are the major objectives of hr planning : Describe three (3) problems that can result from cutting corners to save time or money in the staffing process.
What you consider important in a training plan for managers : Make a prioritized list of what you consider important in a training plan for global managers.
What are three different training techniques you will use : What are three different training techniques you will use in the training? To what theory of Teaching do they apply?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Investigating a social engineering attack

Investigate a social engineering attack describing what has made this attack more successful and the information which was observed from this attack is sure to involve how could this attack be avoided.

  Declare a method get dollars of the cash register class

Declare a method get Dollars of the Cash Register class that yields the amount of the total sale as a dollar value without the cents.

  Construct the fourteen binary trees with four nodes

Construct the 14 binary trees with four nodes. Determine the order in which the vertices of the following binary trees will be visited under preorder.

  What are the four orbit levels for satellite systems

What are the four orbit levels for satellite systems? List a few common application areas for each orbit level satellite system.

  Questionleft explanation is particularly useful while

questionleft explanation is particularly useful while formattinga. a column of numbers representing your every day

  How can you make sure that the proper indexes have been put

As an analyst, how can you make sure that the proper indexes have been put in place so that users are not waiting for weeks to receive the answers to their questions?

  Explain a use case dependency for making an account deposit

Describe (in a one to two page narrative) a use case dependency for making an account deposit. Illustrate this use case with Visio or a similar product.

  Recommendation on the action that the company needs

Prepare a recommendation on the action that the company needs to take against the offender - Prepare a recommendation on the action that the company needs to take against the offender.

  Questionthink of a principle for creating a database and

questionthink of a principle for creating a database and illustrate the database. clarify why you would want to use a

  Name the textbox txtverse and enter into it the bible

create a visual basic form like the one below that allows the user to press buttons to change the background and

  Write a one-page guide to help user of your computer system

Write a one-page guide to help a user of your computer system select one of our sorting algorithms according to the desired application.

  Most operating systems employ a virtual memory manager vmm

most operating systems use a virtual memory manager vmm whose responsibility is to manage the relationship between the

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