Create a class Employee with basic_sal as its data member. Write a program to calculate the gross pay of an employee, with the allowances provided below.
Dearness Allowance = 21% of the Basic Pay
House Rent Allowance = 12% of Basic Pay
Provident Fund = 6.45% of Basic Pay
Net Pay = Basic Pay + Dearness Allowance + House Rent Allowance
Gross Pay = Net Pay − Provident Fund
Implement the program using the concept of Single Inheritance
Please someone help me with this program i am too frustrated solving this
Sports Data
write a JS program to consolidate the data so that each student should participate in only one sport if duplicates entries are found consider the latest entry
input1
[['Arjun','Cricket'],['Ronalodo','Football'],['pradeep','Volleyball']
output1
{Arjun: 'Cricket',Ronaldo:'Football',Pradeep:'Volleyball'}
let inputString = "";
let currentLine = 0;
process.stdin.on("data", (inputStdin) => {
inputString += inputStdin;
});
process.stdin.on("end", (_) => {
inputString = inputString
.trim()
.split("\n")
.map((str) => str.trim());
main();
});
function readLine() {
return inputString[currentLine++];
}
function main() {
let sportsData = JSON.parse(readLine().replace(/'/g, '"'));
/* Please do not modify anything above this line */
/* Write your code here */
}
Write the python program, which prints the following sequence of values in loops:
18,-27,36,-45,54,-63
Date Type Report
given an array myArray write a JS program to find the count of number,object,string,boolean. data values in the array
sample input1
[1, '2', true,{'a':'b'}, false]
sample output1
{number: 1, object:2, string:1, boolean: 2}
"use strict";
process.stdin.resume();
process.stdin.setEncoding("utf-8");
let inputString = "";
let currentLine = 0;
process.stdin.on("data", (inputStdin) => {
inputString += inputStdin;
});
process.stdin.on("end", (_) => {
inputString = inputString
.trim()
.split("\n")
.map((str) => str.trim());
main();
});
function readLine() {
return inputString[currentLine++];
}
function main() {
let myArray = JSON.parse(readLine().replace(/'/g, '"'));
/* Please do not modify anything above this line */
/* Write your code here */
}
Min & Max Values in Array
given an array myArray of integers, write a JS program to find the maximum and minimum values in the array.
input1
[1,4,2,7,9,3,5]
output1
{min: 1, max: 9}
"use strict";
process.stdin.resume();
process.stdin.setEncoding("utf-8");
let inputString = "";
let currentLine = 0;
process.stdin.on("data", (inputStdin) => {
inputString += inputStdin;
});
process.stdin.on("end", (_) => {
inputString = inputString
.trim()
.split("\n")
.map((str) => str.trim());
main();
});
function readLine() {
return inputString[currentLine++];
}
/* Please do not modify anything above this line */
function findMinAndMaxValuesInArray(arr) {
/* Write your code here */
}
/* Please do not modify anything below this line */
function main() {
let myArray = JSON.parse(readLine());
console.log(findMinAndMaxValuesInArray(myArray));
}
Write a menu driven shell script which accepts a number N and an option to calculate the average of:
1. first ‘N’ odd numbers
2. first ‘N’ even numbers.
Create a program that will display a different output based on the user input. If the user entered a number more than 50, it will display "The number is greater than 50". Otherwise, it will display "The number is lesser than what I expected."
print last Half of list from given N inputs
Write a Python code that will read 5 numbers from the user. Your program should print the first number, the sum of the first 2 numbers, the sum of the first 3 numbers, and so on up to the sum of 5 numbers.
==========================================================
Sample Input 1:
1
2
3
4
5
Sample Output 1:
1
3
6
10
15
How to implement this using vector
#ifndef __ROCKPAPERSCISSOR_H__
#define __ROCKPAPERSCISSOR_H__
enum ObjectType { ROCK, PAPER, SCISSOR };
void displayRules();
ObjectType retrievePlay(char selection);
bool validSelection(char selection);
void convertEnum(ObjectType object);
ObjectType winningObject(ObjectType player, ObjectType computer);
void gameResult(ObjectType player, ObjectType computer, int &winner);
void displayResults(int g_count, int w_count1, int w_count2);
#endif