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

Suppose that the content of the input file is: 14 13 26 8 -11 36 0 -1. What is the output of the following code? ifstream myInfi

le; myInfile.open("input.txt"); int value; int sum = 0; for (int x = 0; x < 8; x++) { myInfile >> value; if (value % 2 == 0) sum = sum + value; } cout << sum << endl;
Computers and Technology
2 answers:
Andreyy893 years ago
5 0

Answer:

 

Explanation:

n

tester [92]3 years ago
3 0
I do not know, i really hope you dont fail!!!!!!!!!
You might be interested in
Which of the following class definition defines a legal abstract class Group of answer choices public class Rectangle abstract {
valkas [14]
<h2>Question</h2>

Which of the following class definition defines a legal abstract class Group of answer choices

(a)

public class Rectangle abstract {

   public abstract double findArea ( );

   

}

(b)

public abstract class Rectangle {

   public abstract double findArea ( );

   

}

(c)

public class Rectangle {

   public abstract double findArea ( );

   

}

(d)

public class abstract Rectangle {

   public abstract double findArea ( );

   

}

<h2>Answer:</h2>

(b)

public abstract class Rectangle {

   public abstract double findArea ( );

}

<h2>Explanation:</h2>

When a class is declared with the abstract keyword, the class is called an abstract class. Abstract classes cannot be instantiated and may include one or more abstract methods. If a class contains an abstract method, then it (the class) must be declared abstract.

In Java, abstract classes are defined using the following format:

<em>[access_modifier]</em> abstract class <em>[name_of_class]</em>

[access_modifier] specifies the access modifier of the class which could be public, private, e.t.c

abstract is the keyword that specifies that the class is an abstract class.

class is a keyword used for defining classes

name_of_class specifies the name of the class.

The only option that fulfils this format is <em>option b</em> where;

(i) The access modifier is public

(ii) The name of the class is Rectangle

Option a is not correct because the <em>abstract</em> keyword is supposed to come before the <em>class</em> keyword.

Option c is not correct because the keyword <em>abstract</em> is missing. In other words, the class must be declared abstract since it contains abstract method findArea();

Option d is not correct because the <em>abstract</em> keyword is supposed to come before the <em>class</em> keyword.

7 0
3 years ago
30 points
Murljashka [212]
The answers are Library Catalog access, Simultaneous access, 24/7 availability, and database resources. No physical boundary and systems are also viable options but brick and mortar access is definetely not one.
3 0
3 years ago
Which sorting algorithm is LEAST efficient when performed on an array in which the values are already in the desired sorted orde
Black_prince [1.1K]

Answer:

Merge sort

Explanation:

The various types of sorting algorithms are

1. Quick sort

2. Bubble sort

3. Selection sort

4. Insertion sort

5. Merge sort

6. Heapsort

The algorithm that performs best for an already sorted list is the insertion sort

While the algorithm that performs worse for an already sorted list is the merge sort since it divides the sorted list into sub list before it operations

8 0
3 years ago
Write a program which increments from 0 to 20 and display results in Decimal on the console 2-b) Modify above program to increme
SVEN [57.7K]

Answer:

<em>This program is written in C++</em>

<em>Comment are used to explain difficult lines</em>

<em>The first program that prints 0 to 20 (in decimal) starts here</em>

#include<iostream>

int main()

{

//Print From 0 to 20

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

{

 std::cout<<i<<'\n';

}

}

<em>The modified program to print 0 to 20 in hexadecimal starts here</em>

#include<iostream>

using namespace std;

int main()

{

//Declare variables to use in conversion;

int tempvar, i=1,remain;

//Declare a char array of length 50 to hold result

char result[50];

//Print 0

cout<<"0"<<endl;

// Iterate from 1 to 20

for(int digit = 1; digit<21; digit++)

{

//Start Conversion Process

//Initialize tempvar to digit (1 to 20)

tempvar = digit;

while(tempvar!=0)

{

//Divide tempvar by 16 and get remainder

remain = tempvar%16;

if(remain<10)

{

 result[i++]=remain + 48;

}

else

{

 result[i++] = remain + 55;

}

//Get new value of tempvar by dividing it by 16

tempvar/=16;

}

//Print result

for(int l=i-1;l>0;l--)

{

cout<<result[l];

}

i=1;

cout<<endl;  

}

return 0;

}

//The Program Ends Here

See Attachments for program 1 and 2; program 2 is the modified version of 1

Download cpp
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> cpp </span>
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> cpp </span>
3 0
3 years ago
Question # 4
Valentin [98]

Answer:Control +c

Explanation:yes

3 0
3 years ago
Read 2 more answers
Other questions:
  • What range of leakage current must trip an IDCI?​
    15·1 answer
  • Documenting Business Requirements helps developers control the scope of the system and prevents users from claiming that the new
    13·1 answer
  • A technician receives an invalid certificate error when visiting a website with port 443 enabled. Other computers on the same LA
    8·1 answer
  • Which of the following is defined in terms of their activities related to denial-of-service attacks? Cracker Script kiddie White
    6·1 answer
  • Explain what is meant by information technology (IT). Explain what is meant by information systems (IS). Why is it important to
    7·1 answer
  • Which function in the plane manager allows you to create a new plane where both x and y axes are perpendicular to the line selec
    14·1 answer
  • This Is My Humor 0w0
    10·1 answer
  • You can filter the data based on certain specific conditions in Excel 2013 true or false​
    8·1 answer
  • How did transistors revolutionize the world of computers?
    15·1 answer
  • Pls help
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!