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

Riya took part in a maths quiz competition. To win the prize money she has to solve a tricky question at the end.For a given list of integers, write a program where all the integers in a given index range to be added.

She will be given M multiple ranges, where she should print the sum of numbers for each corresponding range.


Note: The limits in the range are both inclusive.


Input

The first line f input is space-separated integers.

The second line of input is a positive integer M denoting the number of index ranges.

The next M lines contain two space-separated integers of the range.


Output

The output should be M lines.

Each line contains an integer that represents the sum for the corresponding ranges.


Sample Input1

1 3 4 5 6

5

3 5

Sample Output1

12


[Please test the sample test cases and send the screenshots].


Create a module series.py containing functions to determine Fibonacci series and Exponential series. Import the module created to make it accessible, and Call the functions of that module with module name . Demonstrate the access of functions in the module created. 


#include <iostream>

#include <cstring>

using namespace std;


#define STR_MAX_SIZE 100


void preserveString(char*, int);


int main(void) {

  char str[STR_MAX_SIZE];


  cout << "Enter string: ";

  fgets(str, STR_MAX_SIZE, stdin);


  preserveString(str, strlen(str));


  return 0;

}


void preserveString(char *str, int size) {

  if(size > 0) {

    for(int i = 0; i < size - 1; i++) {

      cout << str[i];   

  }

    cout << endl;

     

    


    // TODO: Add the recursive case of the function here

  }

}



please help me to add the recursive function thankyou


Create a class heater that contains a single integer field temperature. Define a constructor that takes no parameter. The temperature field should be set to the value 15 in the constructor. Define the mutates warmer and cooler, whose effect is to increase or decrease the value of the temperature by 5.


characters.asm: Construct an assembly language program that will accept any character then tells whether the entered character is an alphabet, a number, or a special symbol.


Month.asm: Construct an assembly language program that accepts month in number form then displays it in worded form. (Use A for 10, B for 11, and C for 12)

Example:

-                      Enter Month in number form: 6

                       Number 6 month form is June



Objective:

Write a program that asks the user for the name of a file. The program should display

the last 10 lines of the file on the screen (the “tail” of the file). If the file has fewer than

10 lines, the entire file should be displayed, with a message indicating the entire file

has been displayed.

NOTE:

Using an editor, you should create a simple text file that can be used to test this

program.






26. Suppose that the tuition for a university is $10,000 this year and Write a program that computes the tuition in ten years and the total cost of four years"




increases 5% every year.




worth of tuition starting ten years from now. 27. Write a program that convert from kilograms to pounds, miles to kilometers, and from




hour to minutes based on the choice of the user. 28. Write a program that prompts the user to enter the number of students and each student's




name and score, and finally displays the student with the highest score and the student




with the second-highest score.




29. Write a program that prompts the user to enter the number of students and each student's name and score, and finally displays the name of the student with the highest score.



2. Write a float method triangle() that computes the area of a triangle using its two formal parameters h and w, where h is the height and w is the length of the bases of the triangle.




3. Write a float method rectangle() that computes and returns the area of a rectangle using its two float formal parameters h and w, where h is the height and w is the width of the rectangle.








4. The formula for a line is normally given as y= mx +b. Write a method Line() that expects three float parameters, a slop m, a y-intercept b, and an x-coordinate x. the method computes the y-coordinate associated with the line specified by m and b at x coordinate.








5. Write a method Intersect() with four float parameters m1.b1.m2,b2. The parameters come conceptually in two pairs. The first pair contains the coefficients describing one line; the second pair contains coefficients describing a second line. The method returns I








if the two lines intersect. Otherwise, it should return 0;









Creat a class called class1 and class2 which each of having one private data members .Add member function to set value say 'set value' on each class. Add one more function max() that is friendly to both classes and max() function should compare two private member of two classes and show maximum among them


LATEST TUTORIALS
APPROVED BY CLIENTS