Question:
Given an array of unique integers salary where salary[i] is the salary of the employee i.
Return the average salary of employees excluding the minimum and maximum salary.
Example 1:
Input: salary = [4000,3000,1000,2000]
Output: 2500.00000
Explanation: Minimum salary and maximum salary are 1000 and 4000 respectively.
Average salary excluding minimum...
Posted at 02:08h
in
archives
by admin
1. What is the output of print mystr * 2 if mystr = 'Hello World!'? A. Hello World * 2 B. Hello World! Hello World! C. Hello Hello D. mystr mystr2. Which of...
Question:
You supervise a small parking lot which has N parking spaces. Yesterday, you recorded which parking spaces were occupied by cars and which were empty. Today, you recorded the same information. How many of the parking spaces were occupied both yesterday and today?
Input Specification:
The first line of input contains the...
Posted at 06:06h
in
archives
by admin
Question:
A common problem in mathematics is to determine which quadrant a given point lies in. There are four quadrants, numbered from 1 to 4, as shown in the diagram below:
For example, the point A, which is at coordinates (12, 5) lies in quadrant 1 since...
Posted at 05:38h
in
Uncategorized
by admin
Question 1:
Write a program by using counting loop (for loop) to print a multiplication table (a times table). At the start, it should ask the user which table to print. The output should look something like this:
Sample Input:
Which multiplication table would you like? 5
Sample...
Question 1:
A school has following rules for grading system:
Below 25 - F
25 to 45 - E
46 to 50 - D
51 to 59 - C
61 to 80 - B
Above 80 - A
Write a program to ask user to enter marks...