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
Vikentia [17]
3 years ago
8

Int[] myArray1= new int[24]; int[] myArray2= new int[10]; float[] myArray3= new float[8]; int index1, index =0 for(int index1 =0

; index1<24; index1++){ myArray1[inex1]=index1*2; index2=index1%10; index3=index1%8; myArray2[index2] = index3 + index 2 + myArray1[index1]; myArray3[index23 = myArray1[index2] + index3;
Computers and Technology
1 answer:
anastassius [24]3 years ago
3 0

Answer:

The value of myArray2[index2] when index1 = 12 is 30

Explanation:

In the source code, the formula for myArray2[index2] is;

   myArray2[index2] = index2 + index3 + myArray1[index1],

   myArray1[index1] = index1 * 2,

   index2 = index % 10 (equal to the remainder) and

   index3  = index % 8

When index1 increases to 12 in the for-loop statement, the "myArray1[index1]" is equal to 24, index2 is equal to 2 and index3 is 4. The total sum is equal to 30 and assigned to "myArray2[index2]".

You might be interested in
Question 1<br> a node is.<br> •a sever<br> A Cell Phone<br> A Laptop<br> a device on a network
RSB [31]

Answer:

From Networkopoint of view, a node is a redistribution point or communication point or a connection point.

It can also mean devices or data points on a large network Such as laptop, phones, printers, etc

Explanation:

3 0
3 years ago
(--BRAINLIEST--)<br>Explain the types of secondary memory on the basis of data access.​
Nina [5.8K]

There are two types of secondary memories.

  1. RAM
  2. ROM

RAM:

  • RAM stands for random access memory .
  • It is expandable.
  • we can do multiple things in it.
  • Its erasable.

ROM

  • ROM stands for read only memory.
  • It is permanent .
  • We can only read in it.
  • Its permanent hence not removable.
8 0
3 years ago
Read 2 more answers
What tool is used to find and organize files on a mac
Margaret [11]

Answer:

the tool is literally called <u><em>The Finder.</em></u>

Explanation:

hope this helps

4 0
2 years ago
Lottery Number Generator Design a program that generates a 7-digit lottery number. The program should have an Integer array with
Nikolay [14]

Answer:

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

                             Online C++ Compiler.

              Code, Compile, Run and Debug C++ program online.

Write your code in this editor and press "Run" button to compile and execute it.

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

#include <iostream>

#include <string>

#include <sstream>

using namespace std;

bool equal(int sys[],int user[])

{

    for (int i=0;i<7;i++)

{

 if(sys[i]!=user[i]){

     return false;

 }

}

return true;

}

int main()

{

int sys[7];

int user[7];

int min=0

;int max=9;

string userinput;

while(0==0){

for (int i=0;i<7;i++)

{

    sys[i]=rand() % (max - min + 1) + min;

}

cout <<endl;

   cout<<"enter numbers"<<endl;

for (int i=0;i<7;i++)

{

 getline (cin,userinput);

    if(userinput=="x"){

        return 0;

    }

    else{

 stringstream(userinput) >> user[i];

   

    }

}

     cout<<"User number"<<endl;

for (int i=0;i<7;i++)

{

    cout << user[i];

}

    cout<<"system number"<<endl;

for (int i=0;i<7;i++)

{

    cout << sys[i];

}

if(equal(sys,user))

{

   cout<<"You won !"<<endl;

}else {

       cout<<"Try again :("<<endl;

}

}

   return 0;

}

Explanation:

Using c++ rand function generate a random number between 0-9.

Formula for random number is rand (max-min +1)+min.

Run this in a loop for 7 time and store each number to an array index in sys array which is for system generated number.

now using string take input from user and check if input is x close program else use stringstream to parse input string to int and store it in user array. Stringstream is a cpp header file used for parsing and handling of strin g inputs. Run this program in loop for 7 times.

Now create a function of type boolean denoted by "bool". This will take both arr as parameter and check if both are equal or not. It compares eac index of user array against each index of sys array and if both values are not equal returns false.

5 0
3 years ago
Which group allows you to add notes to your presentation?Ella has finished drafting her presentation. What should she do next?
liq [111]
Ella should view the presentation as a slideshow to see how it will look to her audience. 
6 0
3 years ago
Read 2 more answers
Other questions:
  • Netflix suggestions ?
    15·2 answers
  • Which statement about the Paste Link option is true? A)Even if the source file (spreadsheet) is deleted, the data updates automa
    11·1 answer
  • To reduce inflation, the Federal Reserve _____ the money supply. This action also causes the economy to shrink.
    13·2 answers
  • 1. In Access, a template is which of the following? a. A database to manage contacts b. Where a database is stored c. Two tables
    5·1 answer
  • Why does everyone refer to dogs as being loyal
    11·2 answers
  • A ____ object is used to hold data that is retrieved from a database via the OleDbDataAdapter connection. a. DataRecord b. DataS
    12·2 answers
  • What will be the output after the following code is executed? def pass_it(x, y): z = y**x return(z) num1 = 3 num2 = 4 answer = p
    7·1 answer
  • Write a Python3 program to check if 3 user entered points on the coordinate plane creates a triangle or not. Your program needs
    12·1 answer
  • Whats yall favv scary movie
    11·1 answer
  • _____ describes the layout of the screen. Block-based, Interface, Editor, Player
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!