Questions
Write a C++ program that will take and validates from the user an integer n between...

Write a C++ program that will take and validates from the user an integer n between 1 and 4. The program will then continue by taking 5 characters from the user. The program will ask the user whether he needs to rotate the characters to the left or to the right. If the user enters a wrong answer, the program will do a rotation to the right. Depending on the answer, the program will rotate the characters "n" times and displays the result on the screen. The program should contain 2 loops. Example 1: The user will enter a value n=3, the characters A B C D E, and rotation to the left. The program will then display DEABC. Example 2: The user will enter a value n=3, the characters A B C D E, and rotation to the right. The program will then display CDEAB.

In: Computer Science

Colgate toothpaste from Colgate-Palmolive Company,Fitbit wearables Explain for the following products:.How companies that offer them make...

Colgate toothpaste from Colgate-Palmolive Company,Fitbit wearables 

Explain for the following products:.How companies that offer them make market segmentation (ie what criteria they use to divide the market into segments)
.Identify the market segments that are created and which these companies serve
.How each company differentiates its products in that market segment
.How each company chooses to be placed in the market

In: Operations Management

A race car starts from rest, accelerates at a constant rate of 3.8 m/s^2 for 23s,...

A race car starts from rest, accelerates at a constant rate of 3.8 m/s^2 for 23s, and then brakes (decelerates) at a constant rate of 5.6 m/s^2 (magnitude) until it comes to a stop. (a) Find the total distance traveled by the car before coming to rest. (b) Draw a graph of the velocity vs. time, and indicate numerical values of any “special points”on the graph.

In: Physics

Discuss how your analysis would differ if you were asked to solve a performance problem vs....

Discuss how your analysis would differ if you were asked to solve a performance problem vs. being directed to develop a course to address a specific training issue.

In: Psychology

Chesterfield County had the following transactions. A budget is passed for all ongoing activities. Revenue is...

Chesterfield County had the following transactions.

  1. A budget is passed for all ongoing activities. Revenue is anticipated to be $888,750 with approved spending of $583,000 and operating transfers out of $246,000.
  2. A contract is signed with a construction company to build a new central office building for the government at a cost of $7,400,000 . A budget for this project has previously been recorded.
  3. Bonds are sold for $7,400,000 (face value) to finance construction of the new office building.
  4. The new building is completed. An invoice for $7,400,000 is received and paid.
  5. Previously unrestricted cash of $1,250,000 is set aside to begin paying the bonds issued in (c).
  6. A portion of the bonds comes due and $1,250,000 is paid. Of this total, $110,000 represents interest. The interest had not been previously accrued.
  7. Citizens' property tax levies are assessed. Total billing for this tax is $845,000. On this date, the assessment is a legally enforceable claim according to the laws of this state. The money to be received is designated for the current period and 90 percent is assumed to be collectible in this period with receipt of an additional 6 percent during subsequent periods but in time to be available to pay current period claims. The remainder is expected to be uncollectible.
  8. Cash of $165,000 is received from a toll road. This money is restricted for highway maintenance.
  9. The county received investments valued at $335,000 as a donation from a grateful citizen. Income from these investments must be used to beautify local parks.

Prepare the entries first for fund financial statements and then for government-wide financial statements.

In: Accounting

What are the different layers that composes a CSP mirror? And are the coatings used? And...

What are the different layers that composes a CSP mirror?

And are the coatings used?

And What kind forces may be applied on CSP mirrors?

Please I need Well detailed answer ! (Calculations + theorems)!!!!

In: Physics

You are on the phone with the project sponsor of a project you are managing. He...

  1. You are on the phone with the project sponsor of a project you are managing. He informs you that he accepted the role reluctantly and now, two months into this eight month project, he is considering withdrawing as a project sponsor. He does not see the need for this role and is extremely busy with his other responsibilities. How do you respond?
  2. You are surprised when your project team "pushes back" on your request for them to schedule a full-day offsite to work with you to develop a risk management plan. They state that they are simply too busy to afford time for this activity. And besides, they feel that if something unforeseen occurs, it is your responsibility to react to it. How do you respond to your team?

In: Economics

discuss the factors that have driven China to engage heavily in Africa and the Middle east....

discuss the factors that have driven China to engage heavily in Africa and the Middle east. Support your analysis with data and reliable citations

In: Operations Management

The issue of transnational crime is here to stay, a fact of life for US citizens,...

The issue of transnational crime is here to stay, a fact of life for US citizens, but our law enforcement system was constructed on an old, disconnected model where the US was an independent country and there was no Internet, travel took days or longer, and communications were done through the mail, on a land-line or in-person. The global nature of crime can be seen in drug trafficking, internet fraud, immigration issues, data theft, and the list goes on.

Think a bit about your world-view and what you've seen in the criminal justice world and tell us how these global implications have impacted the criminal justice system, it's strategies and it's operations.

Write a paragraph at least 300 words

In: Psychology

It is about C++linked list code. my assignment is making 1 function, in below circumstance,(some functions...

It is about C++linked list code. my assignment is making 1 function, in below circumstance,(some functions are suggested for easier procedure of making function.)

void pop_Stack (struct linked_list* list, int number) //*This is the function to make and below is the explanation that should be written in given code.

This function removes some nodes in stack manner; the tail of the list will be removed, repeatedly. The parameter (variable 'number') means the number of nodes that will be removed. When parameter is bigger than 1, popping a node with n times, you do not remove node at one go. If there is only one node in the list, please make sure it frees (de-allocates) both the node and the list. If the list is not a stack type(list->type_of_list!=1), print the error message “Function pop_Stack: The list type is not a stack” and exit the function. If the 'number' parameter is less than 1 or more than the number of nodes in the stack, respectively print the error message “Function popStack: The number of nodes which will be removed is more than 1” and “Function popStack: The number of nodes which will be removed is more than that in the stack”, then exit the function. The removed nodes should be freed.

Given code is written below,(There is a function to fill in last moment in this code)

linked_list.h: This is the header file of linkLQS.c that declares all the functions and values that are going to be used in linkLQS.c. You do not have to touch this function.

-----------------------------------------------------------------------

(Below code is about linked_list.h)

#include
#include
#include


struct linked_node{
   int value;
   struct linked_node* next;
   struct linked_node* prev;
};

struct linked_list{
   int type_of_list; // normal = 0, stack = 1
   struct linked_node* head;
   struct linked_node* tail;
   int number_of_nodes;
};

-----------------------------------------------------------------------------------------------------------------------------

#include "linked_list.h"
#include "string.h"

int list_exist;

struct linked_list* create_list (int number_of_nodes, int list_type)
{
   int a[number_of_nodes];
   int i, j;
   int bFound;

   if (number_of_nodes < 1)
   {
       printf("Function create_list: the number of nodes is not specified correctly\n");
       return NULL;
   }
   if(list_exist == 1)
   {
       printf("Function create_list: a list already exists\nRestart a Program\n");
       exit(0);  
   }
   if(list_type != 0 && list_type != 1)
   {
       printf("Function create_list: the list type is wrong\n");
       exit(0);  
   }
   struct linked_list * new_list = (struct linked_list*)malloc(sizeof(struct linked_list));
   new_list->head = NULL;
   new_list->tail = NULL;
   new_list->number_of_nodes = 0;
   new_list->type_of_list = list_type;

   //now put nodes into the list with random numbers.
   srand((unsigned int)time(NULL));
   if(list_type == 0)
   {
       for ( i = 0; i < number_of_nodes; ++i )
       {
           while ( 1 )
           {
  
               a[i] = rand() % number_of_nodes + 1;
               bFound = 0;
               for ( j = 0; j < i; ++j )
               {
                   if ( a[j] == a[i] )
                   {
                       bFound = 1;
                       break;
                   }
               }
               if ( !bFound )
                   break;
           }
           struct linked_node* new_node = create_node(a[i]);
           insert_node(new_list, new_node);
       }
   }
   else if(list_type == 1)
   {
       for ( i = 0; i < number_of_nodes; ++i )
       {
           while ( 1 )
           {
  
               a[i] = rand() % number_of_nodes + 1;
               bFound = 0;
               for ( j = 0; j < i; ++j )
               {
                   if ( a[j] == a[i] )
                   {
                       bFound = 1;
                       break;
                   }
               }
               if ( !bFound )
                   break;
           }
           struct linked_node* new_node = create_node(a[i]);
           push_Stack(new_list, new_node);
       }
   }
   list_exist = 1;
   printf("List is created!\n");
   return new_list;
}

struct linked_node* create_node (int node_value)//This functon is the example for reference of the assignment function
{
   struct linked_node* node = (struct linked_node*)malloc(sizeof(struct linked_node));
   node->value = node_value;
   node->next = NULL;
   node->prev = NULL;
   return node;
}

void insert_node(struct linked_list* list, struct linked_node* node)//This functon is the example for reference of the assignment function
{
   node->next = NULL;
   node->prev = NULL;

   if(list->head == NULL)       //if head is NULL, tail is also NULL.
   {
       list->head = node;
       list->tail = node;
       list_exist = 1;
   }
   else if(list->head == list->tail)
   {
       node->next = list->head;
       list->head->prev = node;
       list->head = node;
   }
   else if(list->head != list->tail)
   {
       node->next = list->head;
       list->head->prev = node;
       list->head = node;
   }
   (list->number_of_nodes)++;
}

void pop_Stack(struct linked_list* list, int number)//The function to be written!!
{
~~~~~~~~~~~~~ //your code starts from here
}

In: Computer Science

Question 6 Describe Purkinje Phenomenon and Explain Purkinje Mechanism. Discuss the Importance of Purkinje Phenomenon to...

Question 6 Describe Purkinje Phenomenon and Explain Purkinje Mechanism. Discuss the Importance of Purkinje Phenomenon to the Nature of Vision

In: Psychology

Use the Simplex method to solve the following problem:   Max  Z = x1 + 2x2 + 3x3...

  1. Use the Simplex method to solve the following problem:
      Max  Z = x1 + 2x2 + 3x3
      s. to2x1 + x2 + x3 <= 20
    x1 + 2x2 - x3 <= 20
            3x2 + x3 <= 10
           x1, x2, x3 >= 0
    Clearly specify the optimal values of all variables ya used in your procedure as well as the optimal value of the objective function.

  2. In part a), say what corner point was analyzed in each iteration and give the corresponding value of the objective function. Include iteration 0, that is, the one that gives the starting corner point.

In: Operations Management

A 3 page rough draft essay on a debat if you support the legalization of same...

A 3 page rough draft essay on a debat if you support the legalization of same sex marriage?

To begin, you will need to find an argumentative article about a public issue that interests you. To check that the article is argumentative, look for the writer’s position on the topic. The writer should have a clear position that is defended throughout the article. Your goal is to:  1) identify the conversation going on, 2) summarize the author’s argument and reasons, and 3) respond to the article in order to add to the conversation in a new and interesting way.

In: Psychology

Question 7- How has different patient populations aided in our understanding of attention?

Question 7- How has different patient populations aided in our understanding of attention?

In: Psychology

Identify and explain three environmental drivers of change and how they have impacted change restructuring a...

Identify and explain three environmental drivers of change and how they have impacted change restructuring a coorporation.

In: Operations Management