C++ programming

posted by .

write a program C++ program and Use a recursive function that finds the n-th term using the following rule: tn=3tn-1+12tn-2 .

please help me out!

  • computer -

    write a program using DO WHILE LOOP

  • C++ programming -

    Write a program that computes the cost of a long distance call. The cost of the call is determined
    according to the following rate schedules.

    a. A call made between 8:00 AM and 6:00 PM is billed at a rate of 6 rupees per minute.
    b. A call made before 8:00 AM or after 6:00 PM is charged at a rate of 3.75 rupees.
    According to this schedule, if a call starts at any time between 8:00 AM and 6:00 PM, and it ends
    after 6:00 PM then it will be charged at the rate of 6 rupees per minute for the time before 6:00
    PM and for the rest of the time the rate will be 3.75 rupees per minute. For example if a call
    starts at 5:55 PM and ends at 6:05 PM then the charges on this call will be 48.75 (30 rupees for
    first 5 minutes and 18.75 rupees for rest of the time).

    Similarly if a call starts at the time before 8:00 AM but ends after 8:00 AM then it will be
    charged at the rate of 3.75 rupees for the time before 8:00 AM and for remaining minutes after

    8:00 AM the rate will be 6 rupees per minute. For example if a call starts at 7:49 AM and ends at
    8:01 AM the charge on that call will be 47.25 rupees (41.25 for first 11 minutes and 6 rupees for
    last minute).
    The input to the program will consist of the time the call started, and the length of call in
    minutes. The output will be the cost of call. The time is to be input in 24-hours notation, so the
    time 1:30 PM is input as 13:30. The time will be input using two variables of type int, one used
    for hour and other used for minutes. The number of the minutes for length of the call will also be
    input as a value of type int.

    After completing the program test it for following inputs. (first try to judge the answers manually
    and then compare the values with the program output. I may be applying different test data to
    test your program).

    Start time
    8: 21 10 60
    17:55 10
    7:49 12
    6:00 30
    8:00 5

  • C++ programming -


    Problem Solving Tools Total Marks: 50 Marks Due: Friday 22 August 2014

    Suppose we want to construct a C/C++ program that can be used to calculate the area or the volume for a range of 2-D and 3-D shapes respectively. Consider only the following shapes.
    (a) 2-dimensional shapes: triangle, square, rectangle, circle, and trapezium

    (b) 3-dimensional shapes: cuboid, cylinder, cone, and sphere

    Suppose that we want our program to firstly ask the user whether to calculate the area (2-D) or volume (3-D), then secondly ask for the type of the shape, then thirdly ask for inputs of all required dimensions, then fourthly calculate the required area or volume, and then finally display the required result to the user.


    1. Construct a flowchart for this C/C++ program. [15]
    2. Develop a pseudocode for this C/C++ program. [15]
    3. Construct a hierarchy (structure) chart for this C/C++ program. [10]
    4. Construct an IPO chart for this C/C++ program. [10]

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. Programming

    (i) What is binary tree (ii) Write a program to multiply any two matrices. (use any program of choice)
  2. Programming

    Write a pseudocode program that asks the user for an integer between 1 and 12. The program is to calculate the times table for that number. So for example, if the user enters a 2, then the program has to calculate 2x1 and display the …
  3. programming

    How to write a program to create a class roster using an array?
  4. programming MIPS ask 3

    Write a MIPS assembly language program for the following for loop: Pseudocode: int x; # for(x=10; x>0; x--){ # printf("x=%d", 4x); #} In the program use the slt or slti instruction and sll
  5. programming

    Write a program which allows user to enter 10 student names and scores for Java programming 1 and Java programming 2. Allow user to choose which course they want to enter the record for. Use the loop to ask input from user. The program …
  6. c programming

    a student designed a program to accept the age of an employee and then compute the employees retirement year and display the same in a statement on the screen required. a) write out the pseudo-code for the program above b) write the …
  7. programming

    Using python write a program that does the following: •Create the logic for a program whose main() method prompts a user for 1000 numbers and stores them in a list. •Pass the array to a method that reverses the order of the numbers. …
  8. computer programming

    write a program to print fibonaaci series like 2,1,3,4,7,11,18 up to 10th term using function...end function I did it using SUB..end sub in this way : declare sub series cls call series end sub series a=2 b=1 for p =1 to 5 print a; …
  9. coding

    1.write a C program to reverse the elements of array using recursive function(without using for and while loop). 2. write a C program to check the occurrence of an element in array using recursive function(without using for and while …
  10. 9th grade algebra (sequences)

    Can you check my homework please? Given the following representations, tell whether it's arithmetic/geometric, find the difference/ratio, find the explicit formula, find the recursive formula, and the given term. (This whole question

More Similar Questions