Question: C Programming Language ( Code With C Programming Language) Problem Title : Max Number Budi, Anto and Hani are playing a game called Max Number.
C Programming Language ( Code With C Programming Language)
Problem Title : Max Number
Budi, Anto and Hani are playing a game called Max Number. Budi will ask Anto to say N numbers to put into a bag and also ask Hani to say M numbers and remove that number from the bag and next they will find the maximum number from the bag.
Format Input
The first line contains two integers N stating total numbers that will be stored into bag and M stating the total numbers that want to be removed from the bag. The second lines contains N numbers that will be stored into the bag. The third lines contains M numbers that want to be removed from the bag.
Format Output
Output with a format Maximum number is X, where X is the maximum number in the bag. If No Numbers in the Bag, the application will give an output Maximum number is -1
Constraints
- 1 N 100
- 1 M N
- 1 numbers 999
Sample Input & Output (Standard Input & Output)
10 3 99 20 10 8 99 4 9 93 66 55 99 94 10 Maximum number is 93
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
