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]
2 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:
Andreyy892 years ago
5 0

Answer:

 

Explanation:

n

tester [92]2 years ago
3 0
I do not know, i really hope you dont fail!!!!!!!!!
You might be interested in
Time (non-statistical) division multiplexing differs from frequency division multiplexing because it:
yan [13]

Explanation:

We can divide the multiplex in different categorize, for example:

  • FREQUENCY DIVISION MULTIPLEXERS (FDM)
  • TIME DIVISION MULTIPLEXERS (TDM)
  • STATISTICAL TIME DIVISION MULTIPLEXERS (STDM).

But in this case, we're going to explain about the time and frequency, because the time division multiplex differ to frequency, because the circuit is divided horizontally, and the time is vertically

b. splits the communication circuit vertically (with time slots) instead of horizontally

7 0
3 years ago
C++ a. Write a program that uses the function isPalindrome given in example 6-6 (Palindrome). Test your program on the followinn
Whitepunk [10]

Answer:

#include <iostream>

#include <array>

using namespace std;

bool isPalindrome(string str)  

{  

int length = str.length();  

for (int i = 0; i < length / 2; i++)  

 if (toupper(str[i]) != toupper(str[length - 1 - i]))

  return false;  

return true;  

}

int main()

{

array<string, 6> tests = { "madam", "abba", "22", "67876", "444244", "trymEuemYRT" };

for (auto test : tests) {

 cout << test << " is " << (isPalindrome(test) ? "" : "NOT ") << "a palindrome.\n";

}

}

Explanation:

The toupper() addition forces characters to uppercase, thereby making the comparison case insensitive.

5 0
3 years ago
Given a sorted array of integers created on the heap, its size and a new integer, design a function which will enlarge the array
Debora [2.8K]

Using the computational language in C++ to write a code that will organize the values ​​in an array through a mathematical condition.

<h3>writing code in C++</h3>

<em>#include <bits/stdc++.h></em>

<em>using namespace std;</em>

<em>int getIndexInSortedArray(int arr[], int n, int idx)</em>

<em>{</em>

<em>/* Count of elements smaller than current</em>

<em>element plus the equal element occurring</em>

<em>before given index*/</em>

<em>int result = 0;</em>

<em>for (int i = 0; i < n; i++) {</em>

<em>if (arr[i] < arr[idx])</em>

<em>result++;</em>

<em>if (arr[i] == arr[idx] && i < idx)</em>

<em>result++;</em>

<em>}</em>

<em>return result;</em>

<em>}</em>

<em>int main()</em>

<em>{</em>

<em>int arr[] = { 3, 4, 3, 5, 2, 3, 4, 3, 1, 5 };</em>

<em>int n = sizeof(arr) / sizeof(arr[0]);</em>

<em>int idxOfEle = 5;</em>

<em>cout << getIndexInSortedArray(arr, n, idxOfEle);</em>

<em>return 0;</em>

<em>}</em>

See more about C++ at brainly.com/question/12975450

#SPJ1

7 0
2 years ago
An apple, potato, and onion all taste the same if you eat them with your nose plugged
lys-0071 [83]

Answer:Have a good dayyyyy

Explanation:    can i be brainliest pls pls

4 0
2 years ago
Read 2 more answers
What should you always do to clean off tables
ikadub [295]
Wipe then off then spray them down then wipe off again
7 0
2 years ago
Read 2 more answers
Other questions:
  • Look at the four schematic symbols shown in the figure above. Each of the symbols is labeled with a number. Which of the followi
    5·2 answers
  • 100 POINTS NEED ASAP PLEASE HELP
    8·2 answers
  • Within the Chart Design tab, which section is used to change the data of a previously created chart?
    12·1 answer
  • Why is time management considered a soft skill
    10·2 answers
  • Marissa, a 21-year-old young woman, is working as an intern at a software company. She has recently graduated from college. She
    6·1 answer
  • Jim has documented a use case that describes the functionality of a system as "To compute gross pay, multiply the hours worked t
    11·1 answer
  • Which weakness of web sites to launch attacks does an sql injection technique exploit?
    15·1 answer
  • Why, y did brainly just do that........or did it just happen to me
    12·2 answers
  • What layer of the OSI model describes how data between applications is synced and recovered if messages don't arrive intact at t
    12·1 answer
  • There are many reasons to convert to the decimal numbering system. Select the best answer. When checking numeric values in compu
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!