java
7 drillsDaily Shop Sales
A local grocery shop owner wants to find the total sales amount for the week. You are given the daily sales figures for 7 days. Calculate and print the sum of all sales.
Highest Exam Mark
A teacher has entered the final exam marks for a class of students. Find and print the maximum mark obtained in the class. The number of students is given first, followed by their respective marks.
Bus Passenger Count
A city bus conductor is recording the number of passengers seated at each of the stops on a route. Given the passenger counts at each stop, count how many times the bus was completely empty (0 passengers).
Reverse Train Time
A railway display board shows the arrival times of trains in minutes remaining. To simulate a reset, you need to print the given array of arrival times in reverse order.
Item Price Search
A customer wants to check if a specific item price exists in a list of recorded prices at a provision store. Given the list of prices and a target price, print "Yes" if the target price is present in the array, and "No" otherwise.
Counting Matching Elements
Counting matching elements in an array means looking at each item one by one and keeping a running tally of how many times a specific target value appears. Imagine you are a teacher checking how many students scored exactly 50 marks in a math test by going down the roll list and dropping a pebble in
Finding Array Sum and Average
Finding the sum and average of an array involves accumulating all the values stored inside the array into a single total amount. Think of emptying your piggy bank and adding up all the coin values one by one to find your total savings. In Java, we use a loop to traverse every element, adding each va