Calculate the sum of squares of numbers using for loop

Assignment Help Programming Languages
Reference no: EM1383681

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

Reference no: EM1383681

Questions Cloud

Conduct a general swot analysis for the sabic company : SABIC implements every year initiatives to improve efficiency and reduce waste. What are these initiatives , and what do you propose to help SABIC in these two areas?
Develop java package comprising of class using encapsulation : Develop the Java package comprising of Class and Student with the given requirements. Encapsulation, Method to print student details alone.
What style of leadership are you prepared to use : What style of leadership are you prepared to use in the givin stiation? Do you have a time frame? How will you difine success?
Concentrations of the reactants and products : The reaction SO 2 (g) + NO 2 (g) NO (g) + SO 3 (g) has an equilibrium constant (Kc) of 0.690 at 450°C. If 0.100 mol each of SO 2 and NO 2 are placed in a 500 mL vessel at this temperature, what are the concentrations of the reactants and produc..
Calculate the sum of squares of numbers using for loop : Given int variables k and total which have already been declared, use for loop to calculate the sum of squares of first 50 counting numbers, and store this value in total.
Traffic flow and queueing theory : Vehicles arrive at a toll booth with a mean arrival rate of 2 veh/min (the time between arrivals is exponentially distributed). The toll booth operator processes vehicles (collects tolls) at a uniform deterministic rate of one every 20 seconds. Wh..
Find the number of colony forming units : From a bacteria stock you serially dilute 1/100 two times, then serially dilute 1/10 two times.  From this last tube you plate 100 ul, which produces 156 colonies the other day.
What are new charge on spheres : What are new charge on spheres - Two insulated charge Cu spheres A and B OF IDENTICAL size have charge qa and -3qa
Find the concentration in mg/ml : A 2.5 mg/ml stock solution was diluted as described in the table below and then the absorbance of each dilution was estimated and presented in the table given below.

Reviews

Write a Review

Programming Languages Questions & Answers

  Accuracy and completeness of computations

Analysis right and you have to develop a plausible argument to "prove" that your analysis is correct

  Write program that takes input arithmetic expression

Write a program that takes as input an arithmetic expression. The program outputs whether the expression contains matching grouping symbols.

  Write method that will take employee-s first name

Implement a class that will have: Implement the method that will take employee's first name and last name as the input and will return full name.

  Describe graphical user interfaces during operation

Describe some of graphical user interfaces (GUIs) and communications messages which happen during operation of a microwave.

  Write program to enter name-number of planet from sun

Write down the program which permits the user to enter name of planet, and then prints message stating that planet's number when counted outward from sun.

  Write software application development coding practices

Use the Library and other resources to write a software application development coding practices guide. Your guide should include recommendations

  Prepare class to include three data member

Prepare Class called Employee that includes three pieces of information as data members - first name (type string), last name (type string) and monthly salary (type float).

  Method takes string and integer as parameters

Write a method called multiConcat which takes a String and an integer as parameters. Return String made up of the string parameter concatenated with itself count times.

  Program to assign anonymous array of double value

Write c++ statements to permit the user to enter n, number of values to be processed; then assign an anonymous array of n double values, storing its address in doublPtr.

  Program to output circle-s radius-diameter-circumference

Write a program to prompt the user to enter center and a point on circle. Program must then output circle's radius, diameter, circumference, and area.

  Write simple program to prompt user for gross salary

Write simple program which will prompt user for his or her gross salary. Your program than will display net salary whereby 11.00% of the gross salary is deducted for EPF

  Function to convert a decimal input into roman numerals

Write a function that converts a decimal input into Roman Numerals. Your function will take in a number and output a string.

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