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
dexar [7]
2 years ago
5

Evolucion de los sistemas operativos

Computers and Technology
1 answer:
vladimir2022 [97]2 years ago
7 0

xxxxxxxxxxxxxAnswer:

xxxxxxxxxxxxxxxExplanation:

You might be interested in
5. Create a variety of test cases focusing on the sorting algorithm, such as the final element is the smallest, the entire set i
andrew11 [14]

Answer:

// C code

// This code will compute the values of the sales ticket sales for concerts

#include <stdio.h>

#define MAXN 100 // max characters in a group/concert name

#define MAXG 50 // max concerts/groups

#define MAXC 3 //max categories

char group [MAXG][MAXN];

int fans [MAXG][MAXC];

float prices [MAXC];

float sales [MAXG];

int count = 0;

void printArray () {

printf ("%15s%5s%5s%5s%10s\n",

"Concert", "s1", "s2", "s3","Sales");

for (int i = 0; i < count; i++) {

printf ("%15s", group [i]);

for (int j = 0; j < MAXC; j++) {

printf ("%5d", fans[i][j]);

} // end for each category

printf ("%10.2f\n", sales [i]);

} // end for each group

} // end function printArray

void computeSales () {

for (int i = 0; i < count; i++) {

sales [i] = 0;

for (int j = 0; j < MAXC; j++) {

sales [i] += prices [j] * fans [i][j];

} // end for each category

} // end for each group

} // end function computeSales

// ***** totalSales ****

void totalSales()

{

float tsales;

for(int i = 0; i <= MAXC; i++){

tsales += sales [i];

}

printf("\n\t\tThe total sales are: $%.2f\n",tsales);

}

// ***********************************

void switchRows (int m, int n) {

char tc;

int ti;

float v;

// printf ("Switching %d with %d\n", m, n);

for (int i = 0; i < MAXN; i++) {

tc = group [m][i];

group [m][i] = group [n][i];

group [n][i] = tc;

} // end for each character in a group name

for (int i = 0; i < MAXC; i++) {

ti = fans [m][i];

fans [m][i] = fans [n][i];

fans [n][i] = ti;

} // end for each fan category

v = sales [m];

sales [m] = sales [n];

sales [n] = v;

} // end switch

int findMinSales (int m) {

float min = sales [m];

int target = m;

for (int i = m+1; i < count; i++)

if (sales [i] < min) {

min = sales [i];

target = i;

} // end new max found

return target;

} // end function findMinSales

void sortBySales () {

int target;

for (int i = 0; i < count; i++) {

target = findMinSales (i);

if (target > i)

switchRows (i, target);

} // for each concert

} // end function sortBySales

//**********sort by fans*************

int minFans (int b) {

float min = fans [b][0];

int target = b;

for (int i = b; i < count; i++)

if (fans [i][0] < min) {

min = fans [i][0];

target = i;

} // end new max found

return target;

}

void sortByFans () {

int target = 0;

//int result;

 

for (int i = 0; i < count; i++) {

target = minFans(i);

if (target > i)

//result = target;    

switchRows (i,target);

 

}

}

//********************************

void getData () {

// for (int i = 0; i < MAXG; i++) sales [i] = 0;

printf ("\nEnter ticket prices in each of %d cateogories: ", MAXC);

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

scanf ("%f", &prices [i]);

printf ("-- Enter group and fans in %d categories\n", MAXC);

printf (" . to finish entries:\n");

for (int i = 0; i < MAXG; i++) {

scanf ("%s", group[i]);

if (group [i][0] == '.')

break;

count++;

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

scanf ("%d", &fans[i][j]);

} // end for each group

} // end function getData

int main(void) {

getData ();

computeSales ();

printArray ();

printf ("\n --- Sorted sales ---\n");

sortBySales ();

printArray ();

totalSales ();

printf("--- sorted by fans ---\n");

sortByFans ();

printArray ();

totalSales ();

printf("\t\t ... Bye ...\n");

return 0;

}

7 0
3 years ago
Help please not trying to fail
deff fn [24]

Answer:

B. Everywhere CFCI is not

8 0
3 years ago
Which comparison operator is valid for greater than or equal to?<br><br> &gt;<br> &gt;=<br> =&gt;
lys-0071 [83]
The second one, it should be the one that is opening left with a line underneath, the images are unclear but that’s the most likely correct answer !
3 0
3 years ago
Describe how you would define the relation Brother-in-Law whose tuples have the form (x, y) with x being the brother-in-law of y
damaskus [11]

Answer:

The expression is :

π[cd) + π(g,h) ],[π(e,f)+π(a,b)])

We will use foreign key and primary key

8 0
2 years ago
Consider two different implementations, M1 and M2, of the same instruction set. There are three classes of instructions (A, B, a
Margaret [11]

Explanation:

A.)

we have two machines M1 and M2

cpi stands for clocks per instruction.

to get cpi for machine 1:

= we multiply frequencies with their corresponding M1 cycles and add everything up

50/100 x 1 = 0.5

20/100 x 2 = 0.4

30/100 x 3 = 0.9

CPI for M1 = 0.5 + 0.4 + 0.9 = 1.8

We find CPI for machine 2

we use the same formula we used for 1 above

50/100 x 2 = 1

20/100 x 3 = 0.6

30/100 x 4 = 1.2

CPI for m2 =  1 + 0.6 + 1.2 = 2.8

B.)

CPU execution time for m1 and m2

this is calculated by using the formula;

I * CPI/clock cycle time

execution time for A:

= I * 1.8/60X10⁶

= I x 30 nsec

execution time b:

I x 2.8/80x10⁶

= I x 35 nsec

6 0
2 years ago
Other questions:
  • If a gas gosts 3.60 per gallon how much doe sit cost to drive 500 miles in the city
    5·1 answer
  • Why is timbre an important musical element?
    7·2 answers
  • Easy STEAM question :)
    15·2 answers
  • What does a graphic organizer do
    6·1 answer
  • What are the basic tools for coding HTML manually?
    10·2 answers
  • Over the last few years, security cameras and other devices have become more common. Some people argue that these measures viola
    14·2 answers
  • What is an activity that can help you enhance the appearance of your computer’s desktop?
    13·1 answer
  • Sierra owns a small business and handles many responsibilities, from logistics to marketing. She's seen a lot of success with Go
    11·1 answer
  • Write a Python program segment, using a loop, to calculate and print the sum of the odd integers from 20 to 120. (Hint: 21 23 25
    13·1 answer
  • c) If you are at foreign country visit, which banking card would you prefer to keep with you during visit (Debit Card or Credit
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!