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
mash [69]
3 years ago
13

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

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).) Assign the sum you compute to a variable q For example, if h is 19 , you would assign 4 to q because there are perfect squares (starting with 1 ) that are less than h are: 1 , 4 , 9 , 16 .
_____________________________________________________________________________
Computers and Technology
1 answer:
Nataly_w [17]3 years ago
4 0

Answer:

pseudo code:

x=1

q=0

while x*x<h: {

x += 1}

q=x-1

complete code in C language

#include <stdio.h>

int main() {    

   int h=19;

  int q=0;

   int x=1;

  while ((x*x)<h){

 x += 1;

   }

   q=(x-1);

   printf("The sum of total perfect squares less than %d is: %d", h,q);

   

   return 0;

}

Explanation:

first '%d' in print statement refers to h and second '%d' in print statement refers to q

You might be interested in
To add a slide using the default layout, what should you do before clicking the New Slide button?
SIZIF [17.4K]

You have to add it and then there should be a layout button and you have to press that button

4 0
3 years ago
What can you do if brainstorming only gives you a small or incomplete idea?
Grace [21]

Answer:

D. All of the above

Explanation:

5 0
3 years ago
What role/service is windows 2012 server backup part of?
seraphim [82]
The answer is (D) windows server essentials experience


When Windows server Essentials Experience Role available in Windows Server 2012 R2 Standard and Datacenter is installed, you can take advantage of the many features available in Windows Server 2012 R2 Essentials. This service enables you to protect your client and server by backing up all the client computers and your server within the network.


6 0
3 years ago
To check spelling errors in a document, the Word application uses the _____ to determine appropriate spelling. Internet built-in
Ilya [14]

The answer is built-in dictionary.

Most Microsoft Word versions come with a built-in dictionary for standard grammar and spellings. These dictionaries are not comprehensive. Word also has an additional option to add a spelling error to the dictionary so that the next time you type that same error, it will not come up as a spelling error. In addition, Word can use multiple custom dictionaries that allows you to supplement with the main dictionary and check the spelling of your documents.

6 0
3 years ago
Read 2 more answers
Once you turn 18, if you choose one of the 4 options for accessing credit, how will you be sure you use that credit responsibly?
dmitriy555 [2]

Answer:

hm not sure man

Explanation:

sorry, give me crown and 5 stars  tho

6 0
2 years ago
Other questions:
  • The equation of certain traveling waves is y(x.t) = 0.0450 sin(25.12x - 37.68t-0.523) where x and y are in
    14·1 answer
  • Why does this say I'm in middle school?
    11·1 answer
  • What does nntp stand for?
    12·2 answers
  • GAMES Which is better Roblox or BattleCamp Basically Free Points But Please Answer
    7·2 answers
  • What is the top folder of the file tree called
    5·2 answers
  • Pros and cons of access to a wide range of online services when it comes to an individual's safety?
    14·1 answer
  • Your company runs several databases on a single MySQL instance. They need to take backups of a specific database at regular inte
    12·1 answer
  • 2. Sometimes, validating the HTML code for a web page will help you debug an application, because a. the page won’t run in a bro
    10·1 answer
  • You have a large TCP/IP network and want to keep a host's real time clock synchronized. What protocol should you use?
    10·1 answer
  • The term that refers to the standard computer language for creating web pages is called:
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!