Write necessary class and member function definitions for a cricket player object. (Use array of objects).
The program should accept details from user (max 10) : player code, name, runs, Innings, played, number of times not out.
The program should contain following menu:-
Enter details of players.
Display average runs of a single player.
Average runs of all players
Create an abstract base class called Employee. Use this class to store employee details such as name,designation, basic_pay, DA, HRA, salary. Include a virtual method to compute salary. Derive two classes called Manager and Workers to include pay and allowances of employees to calculate total salary.
Number to English Words
Write a program to convert a non-negative integer
The input will be a single line containing an integer
The output should be a single line containing the representation of the English words of number
For example, if the given number is 123, your code should print the English words representation, which is
One Hundred Twenty Three
Sample Input 1
123
Sample Output 1
One Hundred Twenty Three
Sample Input 2
10005
Sample Output 2
Ten Thousand Five
Area of Rectangle
Given an MxN matrix filled with
The first line of input will be containing two space-separated integers, denoting M and N.
The next M lines will contain N space-separated integers, denoting the elements of the matrix.
The output should be a single line containing the area of the maximum rectangle.
For example, if the given M, N and elements of matrix are as the following
4 5
X O X O O
X O X X X
X X X X X
X O O X O
The matrix from indices (1, 2) to (2, 4) has the maximum rectangle with
X. So the output should be the area of the maximum rectangle with X, which is 6.
Sample Input 1
4 5
X O X O O
X O X X X
X X X X X
X O O X O
Sample Output 1
Explain the Binary search approach for the following elements to search 7 in the array list. 2,4,13,45,87,100 write the logical part of the program also.
Design a program to read three integer numbers x, y and z and Evaluate arithmetic division for R, given R = z / (x - y). Use exception handling to throw an exception in case division by zero is attempted
Design a template function to find least amount of purchase from the quoted tender document. [Note: Amount in lakhs]
Runtime Input :
5
3
8
10
7
Output :
3 Lakhs
write short notes
1)Convergence of technologies
2)Sensors and actuators
3)superposition
4)qubit
Guess my ID game: Use python while loops to make your friends guess your ID.
Store your ID in a variable called myID.
After students run your code, they will guess what your ID. Is.
Those who don't guess the number will be stuck in an endless loop!
Those who guess the number will end the loop and get a congratulations message!
Start your code with the following message:
Hi, my name is your name. Welcome to my game.
Guess my number
If the number chosen by the user is different than your ID, the user should see the message “You're stuck in my loop!" and be prompted to enter a number again.
If the number entered by the user matches your ID, the number should be printed to the screen, and you should say the following words: "Well done! You are free now."