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
zysi [14]
3 years ago
5

What does the following code do? Assume list is an array of int values, temp is some previously initialized int value, and c is

an int initialized to 0. for (int j = 0; j < list.length; j++) if (list[j] < temp) c++;
Computers and Technology
1 answer:
stellarik [79]3 years ago
8 0

Answer:

<h2><em>The folowing code counts the number of elements in list that are less than temp.</em></h2>

Explanation:

<em>Because an array is an object that stores many values of the same type. An array element is one value in array. An array index is an integer indicating a position in an array. Like strings, arrays use zero base indexing, that is array indexes start with 0(zero).</em>

You might be interested in
Write a program that reads in investment amount, annual interest rate, and number of years, and displays the future investment v
Vlada [557]

Answer:

Following are the code to this question:

import java.util.*; //importing package for user input

public class Main //defining class

{

public static void main(String []ar) //defining main method

{

double investment_amount,interest_rate,future_investment_value; //defining double variables

int years; //defining integer variable

Scanner obx=new Scanner(System.in); //creating Scanner class Object

System.out.print("Enter invest value: "); //print message

investment_amount=obx.nextDouble(); //input value

System.out.print("Enter interest rate: ");//print message

interest_rate=obx.nextDouble();//input value

System.out.print("Enter number of years: ");//print message

years=obx.nextInt();//input value

future_investment_value=investment_amount*Math.pow((1+interest_rate/1200.),years*12); //calculating value by apply formula

System.out.println("you enter amount: $"+investment_amount); //print calculated value

System.out.println("annual interest rate:"+interest_rate+"%");//print calculated value

System.out.printf("Number of years: "+years+" the future investment value is :$%.2f\n",future_investment_value);//print calculated value

}

}

output:

please find the attachment.

Explanation:

Program Description:

  • In the above-given program, inside the main method, a variable is declared that are investment_amount, interest_rate, future_investment_value, and years, in which only year variable is an integer type and other variables are double types.
  • In the next step, a scanner class object that is "obx" is created, which is used to input value from the user end, in the next line we apply the formula to calculate the future_investment_value.
  • At the last step, we all the input and a calculated value    

3 0
4 years ago
. Write the advantages and disadvantages of CLI?
Sindrei [870]

\huge\mathcal\colorbox{blue}{{\color{red}{AnSwEr~↓~↓~}}}

\huge\mathbb\colorbox{black}{\color{white}{Advantages=}}

  • If you know the commands, a CLI can be a lot faster and efficient than any other type of interface. ...

  • A CLI requires less memory to use in comparison to other interfaces. ...

  • A CLI doesn't require Windows and a low-resolution monitor can be used.

\huge\mathbb\colorbox{black}{\color{white}{Disadvantages}}

  • Commands have to be typed precisely. If there is a spelling error the command will fail

\huge\mathbb\colorbox{Blue}{\color{red}{Hope \: It\: Help \: U}}

7 0
3 years ago
Read 2 more answers
If I put a short clip from a copyrighted video to Facebook and make it only viewable to friends, is that illegal?
nirvana33 [79]
No thats not illegal, because it is a copyright. And this is not for school.XD
7 0
4 years ago
What is 54663266326-737237232732773
Monica [59]

Answer:

−7.37182569×10/\14

Explanation:

8 0
3 years ago
What does usb stand for
e-lub [12.9K]
Universal Serial Bus
8 0
3 years ago
Read 2 more answers
Other questions:
  • LAN security policies center on issues concerning connectivity; this includes determining how devices adhere to the network. Amo
    14·1 answer
  • Sometimes, fourth-generation languages (4GLs) are called procedural languages
    9·1 answer
  • Universal Containers is creating a custom Visualforce page to allow users to edit contact records. The developer has used an ape
    6·1 answer
  • Pls help me with this pls
    7·2 answers
  • Briefly explain why corporations are increasingly interested in using Unix or Linux for their operating systems.
    5·1 answer
  • Can I get the code for the Edhesive Assignment 3 Chatbox in python? Thanks.
    15·1 answer
  • I need the answer ASAP. I’ll mark brainliest if right
    5·1 answer
  • In the graph shown here, by what percentage are the number of people in computer occupations in general projected to increase?
    10·2 answers
  • What are three advantages of using enterprise software in an organization?
    10·1 answer
  • Your connection to this site is not secure how to fix.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!