Computer Science, asked by sitimaisarah735, 10 hours ago

pleasee help me..thank you in advance​

Attachments:

Answers

Answered by crastaorpah
0

Answer:

Range =maximum value-minimum value

Explanation:

mark me as brainliest plz

Answered by akumarbhagat925
0

Explanation:

#include <iostream>

#include <fstream>

using namespace std;

int main ()

{

int number(0), max(0), min(0), counter, temp_num, sum_evens(0), sum_odds(0);

ifstream infile;

infile.open ("Input.txt");

if (infile.fail ())

{

cout << "There was an error opening the file.\n";

}

while (!infile.fail() && !infile.eof())

{

for (counter = 0; counter < 51; counter++)

{

infile >> number;

temp_num = number;

if (temp_num > max)

{

max = temp_num;

}

else if (temp_num < min)

{

min = temp_num;

}

}

while (!infile.eof())

{

if (number % 2 == 0)

{

counter = 1;

sum_evens = sum_evens + counter;

counter++;

}

else if (number % 2 != 0)

{

counter = 1;

sum_odds = sum_odds + counter;

counter++;

}

}

}

Similar questions