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
bogdanovich [222]
3 years ago
11

Two parter:

Computers and Technology
1 answer:
sashaice [31]3 years ago
6 0

Answer:

This is an infinite loop.

Explanation:

The while loop while never end since the last statement inside the while loop will continue to decrement the value of num by 1 and the condition num < 9 will always be true.

So either change the condition of the while loop like: num > -9

or start incrementing the variable num in the last statement of the while loop like:

num = num + 1

Note: Don't make both changes at the same time.

Visit: gotit-pro.com for fastest, top-notch and impeccable homework and exams help in a range of subjects and ace your academics.

Thanks and Best Regards: Your Friendly Study Co-Pilot

You might be interested in
During the troubleshooting of a pc that will not boot, it is suspected that the problem is with the ram modules. the ram modules
Damm [24]
The modules were somehow disconnected
8 0
3 years ago
Write a function which the counts the number of odd numbers and even numbers currently in the stack and prints the results.
Lerok [7]

Answer:

See the code below and the algorithm explanation on the figure.

Explanation:

The explanation in order to get the answer is given on the figure below.

Solving this problem with C. The program is given below:

#include <stdio.h>

int main(void) {

   int n, Even=0, Odd=0, Zeros=0;  

   for (;;) {

       printf("\nEnter the value the value that you want to check(remember just integers): ");

       //IF we input a non-numeric character the code end;

       if (scanf("%d", &n) != 1) break;

       if (n == 0) {

           Zeros++;

       }

       else {

           if (n % 2) {

               Even++;

           }

           else {

               Odd++;

           }

       }

   }  

   printf("for this case we have %d even, %d odd, and %d zero values.", Even, Odd, Zeros);

   return 0;

}

5 0
3 years ago
Write down the functions of network layer in your own words.ASAP
sergeinik [125]
Hrhnebevevebnenebebenene
8 0
3 years ago
A regular language can not be infinite.<br> True<br> False
Elan Coil [88]

Answer:

False

Explanation:

A regular language can be represented by a regular expression. A regular language can be infinite. Let us consider a simple example of an infinite regular language:

a* is a regular language represented by a regular expression.

The languages matches all strings containing or more a's.

Clearly this is an infinite language.

Note that all finite languages are regular but all regular languages need not be finite.

3 0
3 years ago
Give a big-O estimate for the number additions used in this segment of an algorithm.
rjkz [21]
Big-O notation is a way to describe a function that represents the n amount of times a program/function needs to be executed. 

(I'm assuming that := is a typo and you mean just =, by the way) 

In your case, you have two loops, nested within each other, and both loop to n (inclusive, meaning, that you loop for when i or j is equal to n), and both loops iterate by 1 each loop.

This means that both loops will therefore execute an n amount of times. Now, if the loops were NOT nested, our big-O would be O(2n), because 2 loops would run an n amount of times.

HOWEVER, since the j-loop is nested within i-loop, the j-loop executes every time the i-loop <span>ITERATES. 
</span>
As previously mentioned, for every i-loop, there would be an n amount of executions. So if the i-loop is called an n amount of times by the j loop (which executes n times), the big-O notation would be O(n*n), or O(n^2). 

(tl;dr) In basic, it is O(n^2) because the loops are nested, meaning that the i-loop would be called n times, and for each iteration, it would call the j-loop n times, resulting in n*n runs.

A way to verify this is to write and test program the above. I sometimes find it easier to wrap my head around concepts after testing them myself.
3 0
3 years ago
Other questions:
  • The ____, or typeface, defines the appearance and shape of letters, numbers, and special characters.
    15·1 answer
  • Which forensics tool would you use to reveal recent pages viewed via the internet explorer browser?
    10·1 answer
  • A company is utilizing servers, data storage, data backup, and software development platforms over an Internet connection.
    14·1 answer
  • What is a seismogram?
    9·1 answer
  • "Switches break up _______________ domains and routers break up _____________ domains."
    14·1 answer
  • If you were infiltrating a network (10.16.0.0/16), and searching for vulnerabilities (while trying to remain undetected), why wo
    11·2 answers
  • A technician has been dispatched to a customer site to diagnose an issue where the computer turns off intermittently. Upon arriv
    11·1 answer
  • Switched backbone networks:_____.a. always use a ring topology.b. require much more management that do routed backbone networks.
    10·1 answer
  • Genetics Vocabulary: no <br> Allele: Different versions of the same qene (Aa, Bb)
    11·1 answer
  • Brainliest for correct answer
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!