udi, 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 1 (standard input) 10 3 99 20 10 8 99 4 9 93 66 55 99 94 10 Sample Output 1 (standard output) Maximum number is 93 Use C Language.
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
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 1 (standard input)
10 3
99 20 10 8 99 4 9 93 66 55
99 94 10
Sample Output 1 (standard output)
Maximum number is 93
Use C Language.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images