Programming & Computer Science Answers

C++ 9913
Python 5288
Java | JSP | JSF 3611
C 1680
C# 1362
Computer Networks 989
Algorithms 652
Databases | SQL | Oracle | MS Access 641
HTML/JavaScript Web Application 588
Other 537
Visual Basic 358
Assembler 209
Software Engineering 202
AJAX | JavaScript | HTML | PHP 166
MatLAB 150
MatLAB | Mathematica | MathCAD | Maple 124
Action Script | Flash | Flex | ColdFusion 112
UNIX/Linux Programming 89
Web Development 73
Excel 36
ASP | ASP.NET 23
Delphi | Pascal 21
Perl 16
Prolog 9
Functional Programming 9
MathCAD 5
Wolfram Mathematica 4
WPF 4
Ruby | Ruby on Rails 3
NodeJS Web Application 2

Questions answered by Experts: 26 876

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

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



LATEST TUTORIALS
APPROVED BY CLIENTS