Computer Science, asked by 2201kamaljeet, 7 months ago

An organization is conducting eye checkup
camp, number of people allowed for
Registration is 10,
A Person is supposed to enter his age for
registration
If an senior citizen above 60yrs age registers
then he is shifted to another queue which will
be 2nd queue, now two separate queues are
created for checkup.
2nd
queue will be for senior citizens.
If number of people in 2nd queue becames 5
then shifting of senior citizens from 1 queue
to
2nd
queue is stopped.
Suppose eye checkup takes approximately 15
mins per person, then calculate the total
number of time taken for checkup by first
queue and second queue respectively.
Number of Person Registrations 'N' for checkup.
1<=N<=10
Age of Person A 10<=A-=100​

Answers

Answered by saisanniboina
0

Answer:

Explanation:

add total time by getting count of first and second queue

Answered by yesiamin6
3

#include<stdio.h>

#include<conio.h>

int main()

{

int n,p,i,t=0,t1=0,p2;

int a[10];

n=5;

for(i=0;i<n;i++)

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

p=0;

p2=0;

for(i=0;i<n;i++)

{

if((a[i]>60)&&(p<=5))

{

p++;

t=p*15;

t=t;

}

else

p2++;

t1=p2*15;

t1=t1;

}

printf("%d",p);

printf("the total time(in min)=%d",(t+t1));

getch();

}

Explanation:

HOPE IT HELPS YOU

DO FOLLOW FOR MORE PROGRAMS

MARK AS BRAINLIEST

Similar questions