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

Suppose list is a one dimensional array of size 25, where in each component is of type int. Further, suppose that sum is an int

variable. The following for loop correctly finds the sum of the elements of list.
Computers and Technology
2 answers:
Varvara68 [4.7K]3 years ago
5 0

Answer:

# include <conio.h>

# include <iostream.h>

using namespace std;

main{

int a[25], sum;

cout<<"enter the values in array a";

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

{

cin>>a[i];

}

sum =0;

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

{

sum= sum + a[j];

}

cout<< sum;

getch ();

}

True [87]3 years ago
3 0

Answer:

False is the correct answer to the following question.

Explanation:

In the following question there some information is missing code is missing which is 'sum = 0;

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

sum = sum + list;

(T/F)'

The following code is incorrect because this is not the right way to add the elements of an array, the correct code is:

int sum=0;

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

{

sum = sum + list[i];

}

In the following code block, we add each elements of an array and the addition is save into the variable "sum"

So, that's why the following code is incorrect.

You might be interested in
Quick!<br>who can solve this?<br><br>:}<br>:}<br>:}<br>:}<br>:}​
Musya8 [376]

Answer:

1.server

2.container

3.empty

4.lead

5.body

6.conttribute

i just know this much

sry

4 0
2 years ago
______ includes websites that encourage interaction and connection among people, businesses, and organizations.
Mice21 [21]
That answer would be, (B) Search Engines
6 0
3 years ago
LAB: Praising dates
blsea [12.9K]

Answer:

Explanation:

The following is the entire modified code, it takes in the date as an input and continues changing the dates to the desired format. If the input format is wrong it says "Wrong Format" and requests another input. If -1 is passed as an input the program terminates.

        import java.util.Scanner;

        class DateParser {

public static int getMonthAsInt(String monthString) {

        int monthInt;

        switch (monthString) {

            case "January" :

                monthInt = 1;

                break;

            case "February":

                monthInt = 2;

                break;

            case "March":

                monthInt = 3;

                break;

            case "April":

                monthInt = 4;

                break;

            case "May":

                monthInt = 5;

                break;

            case "June":

                monthInt = 6;

                break;

            case "July":

                monthInt = 7;

                break;

            case "August":

                monthInt = 8;

                break;

            case "September":

                monthInt = 9;

                break;

            case "October":

                monthInt = 10;

                break;

            case "November":

                monthInt = 11;

                break;

            case "December":

                monthInt = 12;

                break;

            default:

                monthInt = 0;

                }

        return monthInt;

       }

        public static void main(String[] args) {

        Scanner scnr = new Scanner(System.in);

               // TODO: Read dates from input, parse the dates to find the one

        // in the correct format, and output in m/d/yyyy format  

 

                String date = "";

                while (!date.equals("-1")) {

                    String month = "";

                    String day = "";

                    String year = "";

                    System.out.println("Enter date:");

                    date = scnr.nextLine();

                    try {

                        year = date.substring((date.length()-4), date.length());

                        if (Character.isDigit(date.charAt(date.length()-8))) {

                            day = date.substring((date.length()-8), date.length()-6);

                            month = date.substring(0, date.length()-9);

                        } else {

                            day = date.substring((date.length()-7), date.length()-6);

                            month = date.substring(0, date.length()-8);

                        }

                        if ((year.length() == 4) && (day.length() > 0) && (day.length() <= 2) && (month.length() >= 3)) {

                            System.out.println(getMonthAsInt(month) + "/" + day + "/" + year);

                        } else {

                            System.out.println("Wrong Format");

                        }

                    } catch (Exception e) {

                        System.out.println("Wrong Format");

                    }

                }    

        }

}

4 0
3 years ago
What's the difference between an exe file and an msi file?
tatiyna

Answer: <u>EXE files are mainly used to indicate that the file is executable</u>

<u>MSI files show that the file is a Windows Installer</u>

<u />

Explanation:

EXE files are mainly used to indicate that the file is executable

MSI files show that the file is a Windows Installer

<u>MSI files are only used with launchers, EXE does not need to be used with launchers </u>

Hope this helped :)

5 0
2 years ago
In the u.s.all financial institutions are required to conduct business at a physical location only
Ad libitum [116K]

Answer:

The answer is false.

Explanation:

5 0
3 years ago
Other questions:
  • Jenny needs to record the names of 30 students, write down the subjects they studied, and note their grades in each subject afte
    14·2 answers
  • When u look at a green object through red glass the object will appear
    11·2 answers
  • How has social media changed professional networking?
    11·1 answer
  • For a horror film, Pauline wants to show a computer-generated monster appearing from the body of an actor. How can she do this?
    8·1 answer
  • The only type of donation you can make to a not for profit is to donate money
    10·1 answer
  • cellPhoneBill(m,tx)Write the function cellPhoneBill()that takes two int m and txas input and returns a float.The function takes
    11·1 answer
  • Which of the following is considered proper typing technique?
    15·1 answer
  • One advantage of a PAN​
    10·2 answers
  • Explain why people struggle to control themselves when they engage with social media
    15·2 answers
  • AUPs ensure that an organization’s network and internet are not abused. Select 3 options that describe AUPs.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!