Questions: 9 913

Answers by our Experts: 9 913

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 & Filtering

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


write c++ program using a dynamic arrays to assign seats to pessenger


Example:

Base integer = 3

Initial factor = 2

Number of times to process = 3

Process:

1.) 2 x 3 = 6

2.) 6 x 3 = 18

3.) 18 x 3 = 54


Therefore, the output would above would be 54.


Instructions:

  1. In the code editor, you are provided with a main() function that asks the user for the 3 integer inputs required for this program and calls the getResult().
  2. This getResult() function has the following details:
  3. Return type - int
  4. Name - getResult
  5. Parameters
  6. int - Base integer
  7. int - Initial factor
  8. int - Number of times to process
  9. Description - this is a recursive function which implements the desired behavior explained in the problem description
  10. The getResult() function is partially implemented already. Your only task is to add the correct recursive case.
  1. In the code editor, you are provided with a main() function that asks the user for a string and passes this string and the size of this string to a function call of the function, preserveString().
  2. This preserveString() function has the following description:
  3. Return type - void
  4. Name - preserveString
  5. Parameters
  6. The string
  7. Length of the string
  8. Description - this is a recursive function that prints the string repeatedly. Each time it prints the string, it excludes the last character of the string until only one character is left.
  9. This preserveString() function has already been partially implemented. Your only task is to add the recursive case of this function.

Jackpot!





by CodeChum Admin





Did you know that in lotteries, a 3-digit number with the same numbers in all digits like 777 will hit the jackpot in a casino? In the same manner, let's make a program that will test if a certain 3-digit number hits a jackpot or not by identifying if all the digits of a given number is the same as the second inputted number. If it is, print "Jackpot!"; else, print "Nah".






Let's try this out now!





Input





A line containing two integers separated by a space.





777·7





Output





A line containing a string.





Jackpot!






Write a program that prints all the uppercase characters of the ASCII character table. Display 5 characters per line. Characters are separated by exactly one space.



Suppose that the rent for an apartment is $1000 per month this year and increases 3% every year. Write a C++ program that computes the rent in five years and the total rent for one year starting five years from now


Samurais are so awesome! I'd like to imitate their amazing sword skills some time but I just don't have the courage to harm myself, so I'd just like to print out three forward slashes (\) to digitally imitate the samurai's triple slash skill. Haha!


Sounds easy, right? Then code it now!


Output


Three lines with a single forward slash symbol.


LATEST TUTORIALS
APPROVED BY CLIENTS