Use for loop to calculate sum of squares of numbers

Assignment Help Programming Languages
Reference no: EM1385732

Given int variables k and total which have already been declared, use the for loop to calculate sum of squares of first 50 counting numbers, and store this value in total. Therefore your code must put 1*1 + 2*2 + 3*3 +... + 49*49 + 50*50 into total . Employ no variables other than k and total.

Reference no: EM1385732

Questions Cloud

Display student details and classes in applet : Display student details and classes they have enrolled in Applet. The Applet should have following features. Update and View.
System in bacteria exist to tag dna : Determine what system in bacteria exist to tag DNA that recognized as self and to digest DNA that is not recognized as "self"?
New york linen argued in part that general credit : New York Linen argued in part that General Credit was not a holder in due course because of the notation on the second check. In whose favor should the court rule?
Changes in the data collection process : In the following observational studies, describe changes that could be made to the data collection process that would result in an experiment rather than an observation study. Also, offer suggestions about unseen biases or lurking variables that m..
Use for loop to calculate sum of squares of numbers : Given int variables k and total which have already been declared, use the for loop to calculate sum of squares of first 50 counting numbers, and store this value in total.
Problem related to distribution of weekly water usage : Suppose that the distribution of weekly water usage for single-family homes in a particular city is mound shaped and approximately symmetric. The mean is 1400 gallons, and the standard deviation is 300 gallons.
Differences between centralization and decentralization : Explain the differences between centralization and decentralization and between standardization and mutual adjustment.
Ameliorate antibiotic resistance : To ameliorate antibiotic resistance, several individuals have lowered or eliminated the usage of certain antibiotics. However this has not worked most of the time.
Selection tools for the hiring program at supermarket : Write down three selection tools which you would consider using for the hiring program at the supermarket.

Reviews

Write a Review

Programming Languages Questions & Answers

  Machine language used by sim virtual computer simulator

Write a program in machine language used by the SIM virtual computer simulator package to calculate the sum of the four numbers stored in memory addresses A1, A2, A3 and A4.

  Write class to represent temperatures in degree and celsius

Write a Temperature class that represents temperatures in degrees in Celsius, Fahrenheit and Kelvin. Use a floating-point number for the temperature and a character (type char) for the scale.

  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.

  Program-visual basic to compute tips for services rendered

Write a program in Visual Basic 2010 to compute tips for services rendered. The program should request the person's occupation, the amount of the bill and the percentage tip

  Write program to test class-compute next month-s interest

Write the program to test class SavingsAccount. Instantiate two savingsAccount objects, saver1 and saver2, with balances of $2000.00 and $3000.00, respectively. Compute next month's interest and print new balances for both savers.

  Write method to display the number by adding hundred

displayItTimesTwo(), and displayItPlusOneHundred(). Write each method to perform the task its name implies. Save the application as TestMethods.java.

  Write program to merge two files that contain polynomials

Write a program that merges two files that contain polynomials. To merge two files, the input files must be in sorted order.

  Design a c# windows phone 8 application

Design and implement a C# Windows Phone 8 application based on the SoundBoard app in the Windows Phone 8 Development for Absolute Beginners textbook.

  Create program to enter number of packages bought

Create a program which asks user to enter number of packages bought . The program must then display amount of discount (if any) and total amount of purchase after the discount.

  Program to allot new value to first element of array

Write the single statement which assigns new value to first element of array. This new value must be equal to twice value stored in the last element of the array.

  Create pseudocode for program to accept insurance data

Create a pseudocode for a program to accept insurance policy holder data, including a policy number, customer last name, customer first name, age, premium due month, day, and year,

  Determine seperate total of positive and negative numbers

Read set of 40 positive and negative numbers entered from keyboard and determine seperate total of positive and negative numbers. How to show modular design of above statement

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