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
wariber [46]
2 years ago
9

Which programming scenario would most likely involve this array block?SOMEONE PLEASE HELPPP​

Computers and Technology
1 answer:
attashe74 [19]2 years ago
7 0

Answer:

answer is D

Explanation:

as the block returns the number of array members, the most likely scenario is the last one.

You might be interested in
Which of the following is a name for the place an information services and support professional might work? software development
masya89 [10]

D.) help desk

is your answer

8 0
3 years ago
Read 2 more answers
Number 20, can anyone help?
SOVA2 [1]

Answer:

the visual grid system limits storage spatially by area

8 0
3 years ago
Number Array Class
UNO [17]

Answer:

Here is the Array class named Number:

#include <iostream>

#include <iomanip>

using namespace std;

class Number {

private:                            

   int size;                      

   float *ptr;                

   float num;                

   

public:                                          

   Number(){

       cout<<"Enter size of array: ";

        cin>>size;                            

   ptr = new float[size];  

   cout<<"Enter elements"<<endl;

   for(int i=0;i<size;i++)     {

       cin>>ptr[i];     }     }

   

   void getNumbers(){

        cout << "{ ";                    

   for (int i = 0; i < size; i++)           {

       cout <<ptr[i] <<setprecision(2)<< " ";             }

   cout << "}";            }

   

   Number(int s){

       ptr = new float[s];          

       size = s;      

   for (int i = 0; i < size; i++)     {

       cout << "Enter elements : ";    

       cin >> num;                          

       ptr[i] = num;         }  }

   

   ~Number(){

        delete [] ptr;    }

   void storeNumber(int input, float num){

        while (input < 0 || input > size-1)  {

       cout << "array size exceeded! Enter an element again " << endl;    

       cin >> input;    

       if (input >= 0 && input < size)  {

           ptr[input] = num;  

           break;       }   }

     if (input >= 0 && input < size)  {

       ptr[input] = num;   }  }

   

   void retrieveNumber(int position){

        while (position < 0 || position > size-1)  {

       cout << "array size exceeded! Enter an element again " << endl;    

       cin >> position;      

        if (position >= 0 && position < size)  {

           cout << "The number at "<<position<<"is: " << ptr[position];  

           break;           }     }      

   if (position >= 0 && position < size)     {

      cout << "The number at "<<position<<" is: " << ptr[position];     }   }    

 

   float HighestNumber(){

       float highest = ptr[0];      

   for (int i = 1; i < size; i++)     {

       if (ptr[i] > highest)         {

           highest = ptr[i];              }     }      

   return highest;      }

   

   float LowestNumber(){

       float lowest = ptr[0];      

   for (int i = 1; i < size; i++)     {

       if (ptr[i] < lowest)         {

           lowest = ptr[i];              }     }      

   return lowest;      }

   

   float AverageNumber(){

       float avg = 0.0;        

   for (int i = 0; i < size; i++)     {

       avg += ptr[i];         }      

   return avg/size;     }    

};

int main() {

   Number array;    

   array.getNumbers();    

   cout << endl;    

   int pos;        

   float no;    

   cout << "Choose an element to replace: ";  

   cin >> pos;    

   cout << "What number do you want to replace element with?" << endl;  

   cin >> no;    

   array.storeNumber(pos, no);

   array.getNumbers();  

   cout << endl;    

   int pos1;  

   cout << "Enter an element to retrieve the number: ";  

   cin >> pos1;    

   cout << endl;  

   array.retrieveNumber(pos1);  

   cout << endl;    

   cout << endl;    

   cout << "The highest number is: " << array.HighestNumber() << endl;    

   cout << "The lowest number is : " << array.LowestNumber() << endl;      

   cout << "Average of all numbers is : " << array.AverageNumber() << endl;    

    cout << endl;    

   return 0;        }

Explanation:

The program is well explained in the comments mentioned with each line of code in the attached document.

The screenshot of the program along with its output is attached.

4 0
3 years ago
You listened to a song on your computer. Did you use hardware or software? Explain.
omeli [17]
Software, unless you planned on permanently downloading the Music Album or Song to your computer's Hard Drive. i.e, you would use whatever Music or Media player you have installed on your computer, and that simply counts as Software. 
 hope this helps.
6 0
3 years ago
Read 2 more answers
How can I use HTML to express a personal value
Mama L [17]

Answer: Order list

Explanation:

7 0
2 years ago
Other questions:
  • The picture that graphically represents the items you use in Windows is called a/an
    12·2 answers
  • Choose a project with a relatively simple description (building a LAN, designing a web page, inventing a new communication devic
    6·1 answer
  • Find the number of times a value appears in a list, and create a new list that contains the index positions where the value occu
    6·1 answer
  • A circuit breaker will do which of the following
    12·1 answer
  • Someone plz answer
    8·1 answer
  • I really need this done Thank you!!
    6·1 answer
  • Holly the Hacker has a list of 100,000 common passwords. She wants to use this list to break into UNIX-like systems that use a p
    14·1 answer
  • 1. Which sentence best expresses the main idea
    12·1 answer
  • Most C++ catastrophe vulnerabilities rely on uninitialized function pointers in a class.
    13·1 answer
  • 8. Which of the following is an output device
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!