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

Write a do-while loop that repeatedly prompts for and intakes input until a negative value is entered. The program will end and display the average of the values entered once a negative value is entered.




You need to find which digit occurs most number of times across the four given input numbers.

input1, input2, input3 and input4 are the four given input numbers.

The program is expected to find and print the most frequent digit.

Example1 –

If input1=123, input2=234, input3=345, input4=673

We see that across these four numbers,

1, 5, 6 and 7 occur once,

2 and 4 occur twice, and

3 occurs four times.

Therefore, 3 is the most frequent digit and so the program must print 3

NOTE: If more than a digit occurs the same number of most times, then the smallest of those digits should be the result. Below example illustrates this.

Example2 –

If input1=123, input2=456, input3=345, input4=5043

We see that

0, 1, 2 and 6 occur once, and

3, 4 and 5 occur thrice.

As there are three digits (3, 4 and 5) that occur most number of times, the result will be the smallest (min) digit out of these three. Hence, the result should be 3


Implement a C++ program to overload the function named as sum, to perform sum of digits of integer and perform sum of digits of float number respectively.


write a python program to add two polynomials.


Polynomial1 = 6x^3 + 10x^2 + 5

Polynomial2 = 4x^2 + 2x + 1


output

6x^3 + 14x^2 + 2x + 6


NOTE: Use string formatting to Display the Output


Make two 2D-points, points in cartesian plane. Calculate the distance between these points.


1. Write a C++ program that calculates the right triangle's hypotenuse c=√a+b

2. Do include the header file < cmath >

3. Run the code.

4. Make sure you save your code and take a screenshot of both the code and the results.


Given a sentence S, write a program to print the frequency of each word in S. The output order should correspond with the word's input order of appearance.


Given a list of integers, write a program to identify the contiguous sub-list that has the largest sum and print the sum. Any non-empty slice of the list with step size 1 can be considered as a contiguous sub-list.


Write a program to print the anti-diagonal elements in the given matrix.


String Slicing

Given two strings 

inputString and subString as inputs, write a JS program to slice the inputString if it includes the subString. Slice the inputString starting from the subString to the end of the inputString.

Input
The first line of input contains a string inputString
The second line of input contains a string subString
Output
The output should be a sliced string or inputString (if the inputString does not include the subString)
Sample Input 1
JavaScript
S
Sample Output 1
Script

Sample Input 2
Language
air
Sample Output 2
Language


LATEST TUTORIALS
APPROVED BY CLIENTS