I have a huge amount of home work that my c++ teacher gave me at school, can you do that questions while i have to study chem and phy and maths for the exams. just post the answers.

i have attached the questions.

thanks

Comments
yes

You're kidding, right? Is it April Fool's day already?

Read the sticky posts - we don't do your work, but we'll be glad to help once you've shown a reasonable attempt on your own.

Wow, this is funny. Hey, I have a lot of exams right now and I am
broke, can you just give me couple of thousands of dollars, so I don't have
to work? Just mail it to me.


1. A machine purchased for $28,000 is depreciated at a rate of $4000 a year for seven years. Write and run a C++ program that computes and displays a depreciation table for seven years. The table should have the form

Year
Depreciation
End-of-Year Value
Accumulated Depreciation

1
4000
24000
4000

2
4000
20000
8000

3
4000
16000
12000

4
4000
12000
16000

5
4000
8000
20000

6
4000
4000
24000

7
4000
0
28000

how can i input this in a tubo c++ program? it is my first time to encounter this problem... Can anyone help me?

adhruv92 First And Last Time: I did NOT do this to actually do you homework for you, the reason I actually did it was for a C++ refreshment in math, secondly I thought since no one else will actually help you, I can give you an idea of how it is done but this is NOT exactly the right code you are looking for... what you want is to implement loops such as if(P < 2000) { Interest = , Compounded= , Etc} else if (P > 2000) && (P < 6000) { BLAH BLAH BLAH } YES you will learn loops and c++ to finish your homework if you do need help post here but I will not continue the code any further unless you show that you understand it and can continue on your own with implementing the stuff you need it to do...

#include <iostream>
#include <windows.h>
#include <math.h>
#include <stdio.h>

using namespace std;

int main()
{
    float F, P, I, N , Y, power, Outside, U, TC;
    
    cout<<"Please Enter the Amount Of The Initial Deposit: \n";
    cin>> P;
    cout<<"Enter The Interest Rate: \n";
    cin>> I;
    cout<<"Enter The Number Of Time Compounded Per Anum: \n";
    cin>> N;
    cout<<"Enter The Amount Of Years The Deposit Will Be In The Bank: \n";
    cin>> Y;
    
    U = ((I/100)/N);
    I = (1 + U);
    TC = (N * Y);    
    power = pow(I, TC);
    F = (P * power);
    std::cout.precision(20);
    cout<<"The Final Amount Is: "<< F <<endl;
    Sleep(10000);
}

Release Note: instead of all the fancy math work you can do:
F = (P * (pow((1+ ((I/100)/N)), (N *Y)))); cuz the formula is that but for whatever reason I get the wrong result so I put fancy steps in the code to get the right output

Edited 7 Years Ago by triumphost: n/a

//Numbers where the 3rd number is the sum of the last two numbers infront of it...
//Example 1,1,2,3,5,8,13,21

#include <stdio.h>
#include <windows.h>

int main ()
{

     int num, t;
     double num1, num2, ans;

     num1 = 0;
     num2 = 1;

     printf("Enter the Amount Of Numbers You Want?\t");
     scanf("%d", &num);

     printf("1\t%.0f\n2\t%.0lf\n", num1, num2);

     for(t = 0; t < (num - 2); ++t){

          ans = (num1 + num2);

          printf("%d\t%.0lf\n", t+3, ans);

          num1 = num2;
          num2 = ans;
     }

  Sleep(10000);   
    return 0;
}

Edited 3 Years Ago by Dani: Formatting fixed

This article has been dead for over six months. Start a new discussion instead.