# Solve it with C programing  On a bus, there are N number of passengers sitting on their seats ranging from 0 to N-1. Karim is looking for passengers whose ages are multiplicand of 4 and seats are within a specific range (X to Y), where both X and Y are inclusive. Now can you help Karim to solve his problem? Input: In the first line you have to take an integer (N) which indicates total number of passengers. Next line you will take two space-separated integers (X Y) which indicates the seat range. Third line of input will take N space-separated integers indicating the ages of the passengers. N.B: Seat number will count from 0 to N-1. Sample input: 10 4 7 22 36 37 21 16 24 32 27 21 75 Sample output : 16 24 32

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

# Solve it with C programing 

On a bus, there are N number of passengers sitting on their seats ranging from 0 to N-1. Karim is looking for passengers whose ages are multiplicand of 4 and seats are within a specific range (X to Y), where both X and Y are inclusive. Now can you help Karim to solve his problem?

Input: In the first line you have to take an integer (N) which indicates total number of passengers.
Next line you will take two space-separated integers (X Y) which indicates the seat range.
Third line of input will take N space-separated integers indicating the ages of the passengers.

N.B: Seat number will count from 0 to N-1.

Sample input:
10
4 7
22 36 37 21 16 24 32 27 21 75

Sample output :
16 24 32

Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY