/*instructions: please do not change the general structure of the code that I already have please...

/*instructions: please do not change the general structure of the code that I already have

please write it in C programming

Define the interface for a queue ADT and implement it in two ways: one with a dummy node (or nodes) and one without.
In addition to the two standard queue functions you’ll need a function to create/initialize an empty queue,
a function to free an existing queue (which may not be empty),
and a function to return the size (number of keys) in the queue.
All functions should be as efficient as possible, e.g., the complexity of enqueue and dequeue must be O(1).
An additional requirement is that the underlying data structure should not be a doubly-linked list.*/

#include <stdio.h>
#include <stdlib.h>

typedef struct node{
int num;
struct node *next;
}Node;

typedef struct{
Node* front
Node* rear;
int size;
}Queue;

//Define the interface for a queue ADT
Queque* initializeQueque()
{
  
}

Queque* insert(int item)
{
  
}

Queque* delete()
{
  
}

void printList(Node* Q)
{
  
}

//get the size of the queque at postion [-1]
//return the size (number of keys) in the queue.
int getsize(Node* Q)
{
  
}

int main()
{
int option,item;
Node* Queque;
  
while(1){
printf("1.Insert number to queque\n2.Delete number from queque\n3.Display numbers in queque\n4.Exit\nEnter a option:");
scanf("%d",&option);
  
switch(option){
case 1:
printf("Enter the number:");
scanf("%d",&item);
Queque=insert(item);
break;
case 2:
Queque=delete();
break;
case 3:
printList(Queque);
break;
case 4:
return 1;
default:
printf("\nWrong input!\n");
break;
}
}
}

In: Computer Science

111 m3/min of hydrogen measured at normal conditions and nitrogen at a 300% excess enter an...

111 m3/min of hydrogen measured at normal conditions and nitrogen at a 300% excess enter an isobaric reactor. The inlet gases at 490°C are reacted in the presence of a catalyst to synthesize ammonia. The process has an efficiency of 33%. The exhaust gases are cooled to -40°C to condense the ammonia. Assume that the Cp of the gas phase species can be used in the temperature range, and that Cp NH3 (l) = 0.071938 kJ/mol K. Calculate the overall heat flow of the system in kW.

In: Other

Modify the program so that, rather than printing data directly to the screen, it will read...

Modify the program so that, rather than printing data directly to the screen, it will read the data into an array of car structs and then print out the contents of the array.

#include "car.h"
#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>

Car GetCar(ifstream& dataIn);

// Pre:  File dataIn has been opened.

// Post: The fields of car are read from file dataIn.

void WriteCar(ofstream& dataOut, Car car);

// Pre:  File dataOut has been opened.

// Post: The fields of car are written on file dataOut,

//       appropriately labeled.  

int main ()

{

  Car  car;

  ifstream dataIn;

  ofstream dataOut;

  dataIn.open("cars.dat");

  dataOut.open("cars.out");

  cout << fixed << showpoint;

  car = GetCar(dataIn);

  while (dataIn)

  {

    car.price = car.price * 1.10f;

    WriteCar(dataOut, car);

    car = GetCar(dataIn);

  }

  return 0;

}

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

Car GetCar(ifstream&  dataIn)

{

  Car car;

  dataIn >> car.customer;

  dataIn >> car.price  >> car.purchased.day        

         >> car.purchased.month  >> car.purchased.year;

  dataIn.ignore(2, '\n');

  return car;

}

                                                            

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

void  WriteCar(ofstream&  dataOut, Car  car)

{

  dataOut << "Customer: " << car.customer << endl

    << "Price:    " << car.price << endl

    << "Purchased:"  << car.purchased.day << "/"

    << car.purchased.month << "/"

    << car.purchased.year << endl;

}

.h file

#include <string>

struct PersonType {
    std::string firstname;
    std::string lastname;
};

struct Date
{
  int month;
  int day;
  int year;
};

struct Car
{
  float price;
  Date purchased;
  PersonType customer;
};

In: Computer Science

Two stationary positive point charges, charge 1 of magnitude 4.00nC and charge 2 of magnitude 1.70nC...

Two stationary positive point charges, charge 1 of magnitude 4.00nC and charge 2 of magnitude 1.70nC , are separated by a distance of 39.0cm . An electron is released from rest at the point midway between the two charges, and it moves along the line connecting the two charges.

What is the speed vfinal of the electron when it is 10.0cm from charge 1?

In: Physics

At an output level of 18,500 units, you have calculated that the degree of operating leverage...

At an output level of 18,500 units, you have calculated that the degree of operating leverage is 2.10. The operating cash flow is $44,000 in this case. Ignore the effect of taxes.

a. What are fixed costs? (Do not round intermediate calculations and round your answer to the nearest whole number, e.g., 32.)

b. What will the operating cash flow be if output rises to 19,500 units? (Do not round intermediate calculations and round your answer to 2 decimal places, e.g., 32.16.)

c. What will the operating cash flow be if output falls to 17,500 units? (Do not round intermediate calculations and round your answer to 2 decimal places, e.g., 32.16.)

In: Finance

I need to do a solvency ratio analysis. The company I have chosen for this is...

I need to do a solvency ratio analysis. The company I have chosen for this is Lyft. Can someone help me with this? How do I upload the financial statement?

In: Accounting

A -11.0 nC point charge and a +22.0nC point charge are 18.0 cm apart on the...

A -11.0 nC point charge and a +22.0nC point charge are 18.0 cm apart on the x-axis.

A)What is the electric potential at the point on the x-axis where the electric field is zero?

B) What is the magnitude of the electric field at the point on the x-axis, between the charges, where the electric potential is zero?

In: Physics

Innovation is the driving force in development; without innovative entrepreneurs we would not have most of...

Innovation is the driving force in development; without innovative entrepreneurs we would not have most of the tools and services that provide many of us with prosperity today. From birth control to the internet, innovation has fundamentally changed the world. Despite this, most of the work on understanding the process of innovation and its relationship to public policy has been conducted in economies at more advanced stages of development. In fact, the importance of innovation is often downplayed for developing countries.
Discuss the conditions under which entrepreneurs in developing countries innovate.

In: Economics

How to educate a patient. on performing Kegel exercises

How to educate a patient. on performing Kegel exercises

In: Nursing

The better-selling candies are often high in calories. Assume that the following data show the calorie...

The better-selling candies are often high in calories. Assume that the following data show the calorie content from samples of M&M's, Kit Kat, and Milky Way candies.

M&M's Kit Kat Milky Way
250 245 200
210 205 208
240 225 202
230 235 190
250 220 180

Test for significant differences among the calorie content of these three candies.

A) State the null and alternative hypotheses.

H0: MedianMM = MedianKK = MedianMW
Ha: MedianMM ≠ MedianKK ≠ MedianMW

H0: All populations of calories are identical.
Ha: Not all populations of calories are identical.    

H0: Not all populations of calories are identical.
Ha: All populations of calories are identical.

H0: MedianMM = MedianKK = MedianMW
Ha: MedianMM > MedianKK > MedianMW

H0: MedianMM ≠ MedianKK ≠ MedianMW
Ha: MedianMM = MedianKK = MedianMW

B) Find the value of the test statistic. (Round your answer to two decimal places.)

C) Find the p-value. (Round your answer to three decimal places.)

D) At a 0.05 level of significance, what is your conclusion?

Reject H0. There is sufficient evidence to conclude that there is a significant difference among the calorie content of these three candies.

Do not reject H0. There is sufficient evidence to conclude that there is a significant difference among the calorie content of these three candies.    

Reject H0. There is not sufficient evidence to conclude that there is a significant difference among the calorie content of these three candies.

Do not reject H0. There is not sufficient evidence to conclude that there is a significant difference among the calorie content of these three candies.

In: Math

Calculate the effective value of g, the acceleration of gravity, at 7400m above the Earth's surface....

Calculate the effective value of g, the acceleration of gravity, at 7400m above the Earth's surface.

Calculate the effective value of g, the acceleration of gravity, at 7400 km above the Earth's surface.

In: Physics

create a Java application program that will add up the cost of three items, then print...

create a Java application program that will add up the cost of three items, then print the final total with sales tax.

You should begin by prompting the user to enter three separate prices for three items that are being purchased. For each item you should ask for (in this order) the quantity of the product and the price of the product.

The program should compute, and be able to print to the screen:

the subtotal (the total amount due before tax)

sales tax (the amount of sales tax that will be added, assume 7% tax rate)

total due (subtotal + sales tax)

The following is an example of what your MIGHT see on the screen when your program runs. The exact output depends on what values that the user types in while the program runs. The user's values are shown below in italics:

Enter the quantity of the first product: 3
Enter the price of the first product: $5.25
Enter the quantity of the second product: 2
Enter the price of the second product: $1.83
Enter the quantity of the third product: 7
Enter the price of the third product: $0.89

Subtotal: $25.64
Sales Tax: $1.79
Total Due: $27.43

can post a screen shot of your java program Would like to learn the steps, i am doing intro to Java programing

In: Computer Science

You have $5,995.14 in a brokerage account, and you plan to deposit an additional $6,000 at...

You have $5,995.14 in a brokerage account, and you plan to deposit an additional $6,000 at the end of every future year until your account totals $280,000. You expect to earn 13% annually on the account. How many years will it take to reach your goal? Round your answer to two decimal places at the end of the calculations.

___ years

In: Finance

What are the major difference between univariate, bivariate, and multivariate analysis? What is the difference between...

What are the major difference between univariate, bivariate, and multivariate analysis?

What is the difference between correlation and regression?

Inferential statistics allow us to

In: Math

You must use C Language. End Goal: HATFIELD, HEIDI KAISER, RUSSELL LIPSHUTZ, HOWARD PENKERT, DAWN WRIGHT,...

You must use C Language.

End Goal:

HATFIELD, HEIDI
KAISER, RUSSELL
LIPSHUTZ, HOWARD
PENKERT, DAWN
WRIGHT, ELIZABETH

The user inputs the students first name and last names separately but within one loop. The loop should end when the user presses enter on the first name without entering any text. Upon completing entry of data, the output pictured above should display on the output.

Using the code given, follow the steps:

1. You should be able to enter up to 20 student first names. Also, change the input array to an appropriate size of 18 for the length of the first name. Use a meaningful name for the storage of first names array. Change prompts as needed. The loop should exit when the user presses enter when inputing the first name without adding any text. Compile and make sure it works from main(). At this point, you should be able to enter and alphabetize a list of up to 20 first names! Alphabetizing the first name is just a test!!! In the end, you will alphabetize the whole name string.

2. Add another array and get input for last name INSIDE the loop for your first names. This last name array will also be an array of 20 elements but with room for up to 25 characters. Again, do not use another loop! Just add code to input the last name to the first loop. The program should now ask the user to input the student's first name and then last name in that order for each individual. Then the program will loop to continue adding student names until the user presses enter on the student's first name. Make sure the last name is converted to all caps. You do not need to alphabetize this array, but you may want to print it out to make sure everything is working just as a test.

3. Make changes to convert the first name to all upper case using a function. (Example: User enters bob on the first name, then on the last name enters jenkins, it will look like Bob Jenkins instead of bob jenkins)

Last step: Combine last and first into an third array. This code is most easily added to the first loop. You just had the user enter first and last names. So the current value of the subscript used for these arrays can be used to combine content and store in the third array.  Alphabetize THIS array (instead of the first name array) which means you need to send a different pointer to the stsrt() function. Print out the end result. Test that everything is working on this program.

Given Code:

void rollsheet(void) {
int ct = 0;
char *ptstr[LIMIT];
char input[LIMIT][SIZE];
int k;

printf("Enter up to %d student names, and I will sort them!\n", LIMIT);
printf("To stop, press the Enter key at a line's start.\n");
while (ct < LIMIT && s_gets(input[ct], SIZE) != NULL
&& input[ct][0] != '\0')
{
ptstr[ct] = input[ct]; /* set ptrs to strings */
ct++;
}
stsrt(ptstr,ct);
puts("\nHere's the sorted list:\n");
for (k = 0; k < ct; k++)
puts(ptstr[k]) ; /* sorted pointers */
}

void stsrt(char *strings[], int num)
{
char *temp;
int top, seek;

for (top = 0; top < num-1; top++)
for (seek = top + 1; seek < num; seek++)
if (strcmp(strings[top],strings[seek]) > 0)
{
temp = strings[top];
strings[top] = strings[seek];
strings[seek] = temp;
}
}


char * s_gets(char * st, int n)
{
char * ret_val;
int i = 0;

ret_val = fgets(st, n, stdin);
if (ret_val)
{
while (st[i] != '\n' && st[i] != '\0')
i++;
if (st[i] == '\n')
st[i] = '\0';
else // must have words[i] == '\0'
while (getchar() != '\n')
continue;
}
return ret_val;
}

In: Computer Science