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

Average of Given Numbers

You are given space-separated integers as input. Write a program to print the average of the given numbers.

Input

The first line of input contains space-separated integers.

Output

The output should be a float value rounded up to two decimal places.

Explanation

In the example, input is

1, 0, 2, 5, 9, 8. The sum of all numbers present in the list is 25, and their average is 25/6.So, the output should be

4.17.


First Prime Number

You are given 

N inputs. Write a program to print the first prime number in the given inputs.

Input

The first line of input is an integer 

N. The next N lines each contain an integer.

Explanation

In the given example of 

5 integers

1 
10 
4
3
2

The output should be 

3.

Sample Input 1
5
1
10
4
3
2
Sample Output 1
3
Sample Input 2
4
2
3
5
7
Sample Output 2
2

Write a program to create a multilevel package and also creates a reusable class to
generate Fibonacci series, where the function to generate fibonacii series is given in a
different file belonging to the same package.

Write a program to show the use of static functions and to pass variable length

arguments in a function.


Write a program to display a message in window using Applet class.


Write a java program to demonstrate static keyword. The program consist three

method with parameters and also use the display method to show the output of

program.


Write a program to demonstrate different mouse handling events like 

mouseClicked(), mouseEntered(), mouseExited(), mousePressed, 

mouseReleased() and mouseDragged().


Write a program that show working of different functions of String and

StringBuffer classs like setCharAt(), setLength(), append(), insert(), concat()and

equals().


Write a program ―DivideByZeroǁ that takes two numbers a and b as input,

computes a/b, and invokes Arithmetic Exception to generate a message when the

denominator is zero.


Write a program that creates illustrates different levels of protection in

classes/subclasses belonging to same package or different packages.


LATEST TUTORIALS
APPROVED BY CLIENTS