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
Akimi4 [234]
3 years ago
13

Which expression adds 1 to the element of array arrayname at index i?

Computers and Technology
1 answer:
NemiM [27]3 years ago
8 0
I believe the answer is <span>++arrayName[ i ].

</span>
You might be interested in
Write four overloaded methods called randomize. Each method will return a random number based on the parameters that it receives
Yuri [45]

Answer:

The Java code given below

Explanation:

//import package

import java.util.Scanner;

//Java class

class Lesson_35_Activity {

  // returns random int b/t min and max inclusive; has 2 int parameters

  public static int randomize(int min, int max) {

      int x = (int) (Math.random() * ((max - min) + 1)) + min;

      return x;

  }

  // returns random int b/t 0 and max inclusive; has one int parameter

  public static int randomize(int max) {

      int x = (int) (Math.random() * (max + 1));

      return x;

  }

  // returns random double b/t min and max inclusive; two double parameters

  public static double randomize(double min, double max) {

      double x = (double) (Math.random() * ((max - min) + 1)) + min;

      return x;

  }

  // returns random double b/t 0 and max inclusive; has one double parameter.

  public static double randomize(double max) {

      double x = (double) (Math.random() * (max + 1));

      return x;

  }

  // main method, which is entry point of the program

  public static void main(String[] args) {

      // object of Scanner class

      Scanner scan = new Scanner(System.in);

      // asking min and max number

      System.out.print("Enter min number : ");

      int mi = scan.nextInt();// reading min number

      System.out.print("Enter max number : ");

      int ma = scan.nextInt();// reading max number

      // checking number

      if (mi < ma) {

          System.out.println(randomize(mi, ma));// method call

          System.out.println(randomize(0, ma));// method call

          double mii = mi;

          double maa = ma;

          System.out.printf("%.2f", randomize(mii, maa));

          System.out.printf("\n%.2f", randomize(0, maa));

      } else {

          // when minimum number is greater than maximum number then display

          System.out.println("Enter min number " + mi + " should be less than max " + ma);

      }

  }

}

6 0
4 years ago
Read 2 more answers
Within a email address Wat is the Domain
GenaCL600 [577]
The domain name<span> part of an email address has to conform to strict guidelines: it must match the requirements for a </span>hostname<span>, consisting of letters, digits, hyphens and dots. </span>
6 0
4 years ago
Read 2 more answers
Create a 4x5 matrix with ones everywhere and zeros on the last row.
Stells [14]

Answer:

#include <iostream>

using namespace std;

int main() {

   int a[4][5];//declaring a matrix of 4 rows and 5 columns.

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

   {

       for(int j=0;j<5;j++)

       {

           if(i==3)//initializing last row as 0.

           {

               a[i][j]=0;

           }

           else//initializing last row as 1.

           {

               a[i][j]=1;

           }

       }

   }

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

   {

       for(int j=0;j<5;j++)

       cout<<a[i][j]<<" ";//printing the matrix.

       cout<<endl;

   }

return 0;

}

Output:-

1 1 1 1 1  

1 1 1 1 1  

1 1 1 1 1  

0 0 0 0 0

Explanation:

I have created a matrix of size 4 rows and 5 columns.I have used for loops to fill the array.To fill the last row with 0 i have used if statement.else we are filling it with 1.

7 0
3 years ago
HELP ME PLZ QUICK Adam is writing a program that: 1) has the user guess a number, and 2) tells the user how many guesses it took
topjm [15]

Adam might have forgotten to loop the guessing code, meaning that instead of letting him guess multiple times, it simply does it once and ends the program. This could be fixed by adding a while loop, or something of the sort, that doesn't let the user finish the program until they guess the number correctly, while adding to the variable that stores the number of guesses each loop.

8 0
4 years ago
Jeff wants to print quickly so he presses the Ctrl and the P. Jeff used a _____. macro invoice template shortcut
Allushta [10]
He used a keyboard shortcut.
3 0
4 years ago
Other questions:
  • A ________ is a container that provides quick access to elements at the front and the back of the list
    6·1 answer
  • Fredrick wants to revise an employee policy. If he wants to inform all of the employees of the change, what type of document wil
    10·2 answers
  • Right click on a spot of your desktop that is not covered by an icon, window, or menu. when the menu comes up, play with the opt
    7·1 answer
  • Which function of InfoSec management encompasses security personnel as well as aspects of the SETA program?
    5·1 answer
  • a paragraph is a segment of text with the same format that begins when you press the enter key and ends when you press enter key
    6·2 answers
  • Who where the romanovs? What happened to them ?
    7·1 answer
  • Claire writes a letter to her grandmother, in which she describes an amusement park she visited last week. She adds pictures of
    13·1 answer
  • What types of character Microsoft Excel understand​
    6·1 answer
  • WILL GIVE BRAINLIEST!!! PLEASE HELP!!!
    5·1 answer
  • What is sytem software?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!