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

Anti-Diagonals

Given a MxN matrix,write a program to print all Anti-Diagonals elements of matrix

Input

The first line of input will contain a M, N values separated by space.
The second line will contain matrix A of dimensions MxN.

Output

The output should contain anti-diagonal elements separated by a line.
Explanation

For example, if M = 4, N = 4
Matrix A:




4 4
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
So the output should be

1
2 5
3 6 9
4 7 10 13
8 11 14
12 15
16
Sample Input 1
2 3
1 5 5
2 7 8
Sample Output 1
1
5 2
5 7
8

Sample Input 2
3 4
1 2 3 4
5 6 7 8
9 10 11 12
Sample Output 2
1
2 5
3 6 9
4 7 10
8 11
12

Numbers in String - 2

Given a string, write a program to return the sum and average of the numbers that appear in the string, ignoring all other characters.Input


The input will be a single line containing a string.Output


The output should contain the sum and average of the numbers that appear in the string.

Note: Round the average value to two decimal places.Explanation


For example, if the given string is "I am 25 years and 10 months old", the numbers are 25, 10. Your code should print the sum of the numbers(35) and the average of the numbers(17.5) in the new line.


Create a program with this statement to declare a array of integers.  int myarray[]={4,77,6,22,3,98};


In the same program create a linked list of integers and in a loop, cycle through the array and store the five values in the linked list.


The Model-View-Controller design pattern decouples data access, business logic, data presentation, and user interaction. Discuss.


c++ program that find x when i input a, b and c. (using quadratic equation)


what is recursive definition defined in detail with examples?


Write four different Java statements that each add 1 to integer variable x.


company insures its workers in the following cases: If the workers is female and married. If the workers is married, male and above 65 years of age. If the driver is unmarried, female and above 45 year Write C++ a program to determine whether the driver is insured or not, using switch statement only


  • Of the containers described in this week’s reading, explain which you prefer for both storing and accessing data. 
  • Take note of the different methods/actions available to each container and the degree to which their actions are efficient. What benefits does this container have over the other containers presented?
  • What are some of the drawbacks of this container? Provide a code example that supports your comments.

The area of a rectangle is the rectangle’s length times its width. Write a program that asks for the length and width of two rectangles. The program should tell the user which rectangle has the greater area, or if the areas are the same.


LATEST TUTORIALS
APPROVED BY CLIENTS