1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Lunna [17]
3 years ago
5

Assume there is a variable, h already associated with a positive integer value. Write the code necessary to compute the sum of t

he perfect squares whose value is less than h, starting with 1. (A perfect square is an integer like 9, 16, 25, 36 that is equal to the square of another integer (in this case 3*3, 4*4, 5*5, 6*6 respectively).) Associate the sum you compute with the variable q. For example, if h is 19, you would assign 30 to q because the perfect squares (starting with 1) that are less than h are: 1, 4, 9, 16 and 30
Computers and Technology
1 answer:
lions [1.4K]3 years ago
6 0

Answer:

int i=1  // initialized i to 1

int q=0  // initialized q to 10

while((i*i)<h) // iterating the while loop

{

q=(i*i)+q  // calculating the sum of square

i=i+1 //Increment of i

}

Explanation:

Following are the description of Program

  • Initialized the variable "i" which is "int" type to 1.
  • Initialized the variable "q" which is "int" type to 0.
  • Iterating the while loop to less then variable "h".
  • In this loop we calculate the sum of square and holding the result in the variable "q".
  • Finally increment the value to "i" by 1 to iterating the loop.
You might be interested in
Which of the following Sales Hub tiers have access to work-flows (HubSpotâs automation platform)?
Minchanka [31]

Answer:

The following Sales Hub tiers have access to work-flows:

C) Sales Hub Professional and above.

Explanation:

  • HubSpot is a management software that helps individuals and companies to keep their business growing by providing services in different categories like marketing, sales, customer support, etc.
  • The Sales Hub professional software has the access to work flow that feature is not present in the free hub spot CRM so the option A is not correct. The option B doesn't true because the Sales Hub Starter doesn't have that feature of work flow.
  • The option D is also incorrect as Sales Hub Enterprise is not the only version that has the feature of access to the work flows.

8 0
3 years ago
Think about what you have learned about work ethic. In a paragraph of no less than 125 words, explain why employers prefer to hi
Zepler [3.9K]

An individual who possesses good work ethic embodies principles like reliability, dependability, dedication to the job, teamwork and cooperation, and a self-disciplined character. Most employers seek a strong work ethic; performance depends on it; satisfaction is derived from it; and it ensures career progression. It is that untouchable effort an employee exemplifies daily, regardless of whether someone is watching or not. A company that has its employees doing exemplary well has everything to do with their performance. Thus, if you have a strong work ethic, you will have qualities that will keep you in demand by huge companies. When you are skilled at the workplace and your colleagues notice and appreciate it, you will have a very deep sense of satisfaction within you. If you put 101 percent, your willingness to work hard will be recognized and will leave you shining brightly than others when the opportunity of promotion knocks.

7 0
3 years ago
You can edit existing conditional formatting _____ from the conditional formatting rules manager dialog box.
Lera25 [3.4K]
I believe the term you're looking for would be "rules" 
send me a message if not true.
7 0
3 years ago
If I wanted to add code so that the costume of my sprite would change, what menu would I look under to find the "change costume"
Damm [24]

Answer:

D.) Looks

the costume is technically the look of your sprite, so looks is the correct answer

7 0
3 years ago
Prompt the user to input five pairs of numbers: A player's jersey number (0 - 99) and the player's rating (1 - 9). Store the jer
tiny-mole [99]

Answer:

  1. import java.util.Scanner;
  2. public class Main {
  3.    public static void main (String [] args) {
  4.        int jersey_num [] = new int[5];
  5.        int rating [] = new int[5];
  6.        Scanner inStream = new Scanner(System.in);
  7.        for(int i=0; i < 5; i++){
  8.            System.out.print("Enter player " + (i+1) + "'s jersey number:");
  9.            jersey_num[i] = inStream.nextInt();
  10.            System.out.print("Enter player " + (i+1) + "'s rating:");
  11.            rating[i] = inStream.nextInt();
  12.        }
  13.        System.out.println("ROSTER");
  14.        for(int j=0; j < 5; j++){
  15.            System.out.println("Player " + (j+1) + "-- Jersey number: " + jersey_num[j] + ", Rating: " + rating[j]);
  16.        }
  17.    }
  18. }

Explanation:

The solution code is written in Java. Firstly create two array, jersey_num and rating, with int type. This is to hold the five pairs of numbers input by user (Line 6 -7).

Next, create a for loop that run for 5 iterations and in each iteration prompt user to input jersey number and rating (Line 11 -17). The input number and rating will be set to the array, jersey_num and rating, respectively.

Next, print the title "Roster" (Line 19).

Create another for loop to display the five input pair of values (Line 21 - 23).

3 0
3 years ago
Other questions:
  • MD5 uses a hash value to create a hash which is typically a 32 character hex number and how many bits?
    11·1 answer
  • Find every number from 1 to n (inclusive) that is a palindrome which starts with the digit 3. Do not user a helper function.
    10·1 answer
  • What is the drawback of the linear model?
    5·2 answers
  • A bug collector collects bugs every day for seven days. Write a program in Python that finds the highest number of bugs collecte
    11·1 answer
  • Write a destructor for the CarCounter class that outputs the following. End with newline.
    9·1 answer
  • Which software documentation guideline did the IEEE establish?
    10·1 answer
  • So, I have an Cru__ on this boy in school and his name is Bray but Yeah.............Can someone help me
    10·2 answers
  • One benefit proprietary licensed software is that it
    9·1 answer
  • A user logs in to a virtual world and creates an animated character representing themselves, which they then use to move through
    15·2 answers
  • Question 8 of 10
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!