Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

help mee how to print the element inside the queue ,i wanna showing like in day 1 onleave : 3 4 5 6 7 working

help mee how to print the element inside the queue

,i wanna showing like in day 1 onleave : 3 4 5 6 7 working : 1 2

but in my cases onleave its started from 2 because in day 1 thats workier is working not on leave and its not showing all of queue,as you can see from below image

image text in transcribed

the code

#include #include using namespace std; int main() { int m[7]={1, 2, 3, 4, 5, 6, 7}; int n=7; queue working,onLeave; //declared 2 queues int a[n]; //declaring array of size n to store the input for(int i=0;i>a[i];//reading staff requirement } for(int i=0;i Enter staff Requirement: 2 2 2 2 2 2 2 day 1 onLeave: 2 3 working: 1 2 day 2 onLeave: 4 5 working: 3 4 day 3 onLeave: 6 7 working: 5 6 day 4 onLeave: 1 2 working: 7 1 day 5 onLeave: 3 4 working: 2 3 day 6 onLeave: 5 6 working: 4.5 day 7 onLeave: 7 1 working: 67<>

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Knowledge Discovery In Databases

Authors: Gregory Piatetsky-Shapiro, William Frawley

1st Edition

0262660709, 978-0262660709

More Books

Students also viewed these Databases questions

Question

a. When did your ancestors come to the United States?

Answered: 1 week ago

Question

d. What language(s) did they speak?

Answered: 1 week ago

Question

e. What difficulties did they encounter?

Answered: 1 week ago