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
Lynna [10]
3 years ago
13

Consider the following code:

Computers and Technology
1 answer:
ycow [4]3 years ago
4 0

Answer:

The num >= 0 test condition is not correct

Explanation:

The line would lead to the printing of "Your entered: " + str(num) repeatedly without stopping.

The while loop checks the condition that the "num" variable is less than zero. This condition will always be true as there is no means of resetting the value after initially inputting the value that is less than zero.

You might be interested in
In what way do networks help to protect data
Aleksandr-060686 [28]

One way that computer networks help to protect data is by backing up the data.

Computer networks are normally formatted to automatically back up all of the data that is stored on them. This protects the data in case of any type of computer system failure.

5 0
3 years ago
What is the status of this account?
nydimaria [60]

Answer:

the answer is A my mom is a accountant and she pretty much told me everything she knows... lol

Explanation:

plz give brainliest and rating hope this helps^_^

5 0
2 years ago
Read 2 more answers
Which Computer career field enables you to create and design interactive multimedia products and service
Stells [14]
The answer is Web and Digital communications
4 0
3 years ago
Read 2 more answers
Design a class that has an array of floating-point numbers. The constructor should accept an integer argument and dynamically al
attashe74 [19]

Answer:

See explaination for the code

Explanation:

Here is the code

class NumberArray

{

private:

float *aptr; // Pointer to the array

int arraySize; // Holds the array size

float max,min,avg;

public:

NumberArray(int); // Constructor

~NumberArray(); // Destructor

int size() const // Returns the array size

{ return arraySize; }

void storeNumber(float num,int ele);

float retrieveNumber(int ele);

float getHighest();

float getLowest();

float getAverage();

};

//*******************************************************

// Constructor for IntArray class. Sets the size of the *

// array and allocates memory for it. *

//*******************************************************

NumberArray::NumberArray(int s)

{

arraySize = s;

aptr = new float [s];

for (int count = 0; count < arraySize; count++)

*(aptr + count) = 0;

}

//******************************************************

// Destructor for IntArray class. *

//******************************************************

NumberArray::~NumberArray()

{

if (arraySize > 0)

delete [] aptr;

}

void NumberArray::storeNumber(float num,int ele)

{

if(ele<arraySize)

*(aptr+ele)=num;

}

float NumberArray::retrieveNumber(int ele)

{

return *(aptr+ele);

}

float NumberArray::getHighest()

{

float high=*(aptr+0);

for(int i=1;i<arraySize;i++)

if(high<*(aptr+i))

high=*(aptr+i);

return high;

}

float NumberArray::getLowest()

{

float low=*(aptr+0);

for(int i=1;i<arraySize;i++)

if(low>*(aptr+i))

low=*(aptr+i);

return low;

}

float NumberArray:: getAverage()

{

float ag=0;

for(int i=1;i<arraySize;i++)

ag+=*(aptr+i);

ag=ag/arraySize;

return ag;

}

//Header file section

#include <iostream>

using namespace std;

int main()

{

const int SIZE = 10; // Array size

// Define an IntArray with 10 elements.

NumberArray table(SIZE);

//function call to store values

table.storeNumber(1,0);

table.storeNumber(3,1);

table.storeNumber(7,2);

table.storeNumber(2,3);

//display values

cout<<"Highest value:"<<table.getHighest()<<endl;

cout<<"Lowest Value:"<<table.getLowest()<<endl;

cout<<"Average:"<<table.getAverage()<<endl;

///pause system for a while

system("pause");

return 0;

}

6 0
2 years ago
¿que lenguaje de programacion usan los operadores matematicos?​
kolbaska11 [484]

Answer:

Matlab / GNU Octave. MATLAB (laboratorio de matrices) es un entorno informático numérico multiparadigma y un lenguaje de programación de cuarta generación.

Explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • Urgent help<br> Write a program that prints ‘Hello World’ to the screen
    8·1 answer
  • Which of the following is a characteristic of the internet today? distributed network central hub lack of protocols absence of c
    5·1 answer
  • What do u say to your bf if he says sayy lesssss
    14·2 answers
  • To display the Color gallery, with the graphic selected, click the Color button in the ____ group on the PICTURE TOOLS FORMAT ta
    14·1 answer
  • How much RAM memory is recommended for your computer to be used as a digital darkroom?
    9·1 answer
  • How to chnage email adresss on slate from tophat?
    13·1 answer
  • Write code that prints: Ready! userNum ... 2 1 Go! Your code should contain a for loop. Print a newline after each number and af
    6·1 answer
  • What are the names of different types of tablets<br>​
    13·1 answer
  • Write the use of these computers.
    14·1 answer
  • What does playstation network is currently undergoing maintenance?.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!