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
vovikov84 [41]
2 years ago
9

Which best explains the relationship among these three facts question 8

Computers and Technology
1 answer:
makvit [3.9K]2 years ago
8 0

Answer:

no attachment

Explanation:

You might be interested in
p25: File Write and Read1) User enters a file name (such as "myMovies.txt").2) User enters the titles of 4 of their favorite mov
SCORPION-xisa [38]

Answer:

<em>The program goes as follows  </em>

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

#include<iostream>

#include<fstream>

#include<sstream>

#include<string>

using namespace std;

int main()

{

//Declare String to accept file name

string nm;

//Prompt user for file name

cout<<"Enter File Name: ";

getline(cin,nm);

//Create File

ofstream Myfile(nm.c_str());

//Prompt user for 4 names of movies

string movie;

for(int i = 1;i<5;i++)

{

 cout<<"Please enter a movie title #"<<i<<": ";

 cin>>movie;

 //Write to file, the names of each movies

 Myfile<<movie<<endl;

}

Myfile.close(); // Close file

//Create an Array for four elements

string myArr[4];

//Prepare to read from file to array

ifstream file(nm.c_str());

//Open File

if(file.is_open())

{

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

 {

  //Read each line of the file to array (line by line)

  file>>myArr[i];

 }

}

file.close(); // Close file

//Create a reverseOrder.txt file

nm = "reverseOrder.txt";

//Prepare to read into file

ofstream Myfile2(nm.c_str());

for(int j = 3;j>=0;j--)

{

 //Read each line of the file to reverseOrder.txt (line by line)

 Myfile2<<myArr[j]<<endl;

}

Myfile2.close(); //Close File

return 0;

}

See attached for .cpp program file

Download cpp
6 0
3 years ago
Write a program that asks the user to enter a number of seconds. There are 60 seconds in a minute. If the number of seconds ente
frez [133]

Answer:

// here is code in c.

#include <stdio.h>

// main function

int main()

{

// variable to store seconds

long long int second;

printf("enter seconds:");

// read the seconds

scanf("%lld",&second);

// if seconds is in between 60 and 3600

if(second>=60&& second<3600)

{

// find the minutes

int min=second/60;

printf("there are %d minutes in %lld seconds.",min,second);

}

// if seconds is in between 3600 and 86400

else if(second>=3600&&second<86400)

{

// find the hours

int hours=second/3600;

printf("there are %d minutes in %lld seconds.",hours,second);

}

// if seconds is greater than 86400

else if(second>86400)

{

// find the days

int days=second/86400;

printf("there are %d minutes in %lld seconds.",days,second);

}

return 0;

}

Explanation:

Read the seconds from user.If the seconds is in between 60 and 3600 then find the minutes by dividing seconds with 60 and print it.If seconds if in between 3600 and 86400 then find the hours by dividing second with 3600 and print it. If the seconds is greater than 86400 then find the days by dividing it with 86400 and print it.

Output:

enter seconds:89

there are 1 minutes in 89 seconds.

enter seconds:890000

there are 10 days in 890000 seconds.

8 0
2 years ago
A large population of ALOHA users manages to generate 50 requests/sec, including both originals and retransmissions. Time is slo
krok68 [10]

Answer:

The answer is below

Explanation:

Given that:

Frame transmission time (X) = 40 ms

Requests = 50 requests/sec, Therefore the arrival rate for frame (G) = 50 request * 40 ms = 2 request

a) Probability that there is success on the first attempt = e^{-G}G^k but k = 0, therefore Probability that there is success on the first attempt = e^{-G}=e^{-2}=0.135

b) probability of exactly k collisions and then a success = P(collisions in k attempts) × P(success in k+1 attempt)

P(collisions in k attempts) = [1-Probability that there is success on the first attempt]^k = [1-e^{-G}]^k=[1-0.135]^k=0.865^k

P(success in k+1 attempt) = e^{-G}=e^{-2}=0.135

Probability of exactly k collisions and then a success = 0.865^k0.135

c) Expected number of transmission attempts needed = probability of success in k transmission = e^{G}=e^{2}=7.389

6 0
3 years ago
Consider a binary search tree where each tree node v has a field v.sum which stores the sum of all the keys in the subtree roote
AVprozaik [17]

Answer:

Each time you insert a new node, call the function to adjust the sum.

This method has to be called each time we insert new node to the tree since the sum at all the

parent nodes from the newly inserted node changes when we insert the node.

// toSumTree method will convert the tree into sum tree.

int toSumTree(struct node *node)

{

if(node == NULL)

return 0;

// Store the old value

int old_val = node->data;

// Recursively call for left and right subtrees and store the sum as new value of this node

node->data = toSumTree(node->left) + toSumTree(node->right);

// Return the sum of values of nodes in left and right subtrees and

// old_value of this node

return node->data + old_val;

}

This has the complexity of O(n).

Explanation:

6 0
2 years ago
Add me on fornite buddies Lynn_.25
Anna007 [38]

i- why would u ask that

Explanation:

6 0
2 years ago
Read 2 more answers
Other questions:
  • What is the opportunity cost of computers when moving from point A to point B? -15 DVDs b. What is the opportunity cost of compu
    13·1 answer
  • Which registry hive is loaded first during windows startup?
    5·1 answer
  • Mr. Perry has bookmarked a large number of webpages in Chrome while researching class topics. Unfortunately, he's bookmarked so
    13·1 answer
  • The space force enhancement function concerned with providing data on meteorological, oceanographic, and space environmental fac
    12·1 answer
  • )finding an unused location in the hash table is called
    5·1 answer
  • Why is Linux widespread in academic environments?
    7·1 answer
  • Check My Work Sherri is considering replacing a processor on her laptop. The laptop is running slower than she would like. What
    9·1 answer
  • Which object event is an indication that something has been created but not committed into the database?
    13·1 answer
  • Xxx<br>uuuuuu<br>uuuu<br>jjnmn<br>jjh
    12·1 answer
  • Disuss the roles of hardware,software and databases in regard to computer based information systems
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!