| | |
Want some C++ questions to be solved
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
0
#2 Oct 10th, 2009
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.
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.
Everyone's gotta believe in something. I believe I'll have another drink.
~~~~~~~~~~~~~~~~~~
Looking for an exciting graduate degree? Robotics and Intelligent Autonomous Systems (RIAS) at SDSM&T See the program brochure here.
~~~~~~~~~~~~~~~~~~
Looking for an exciting graduate degree? Robotics and Intelligent Autonomous Systems (RIAS) at SDSM&T See the program brochure here.
2
#3 Oct 10th, 2009
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.
broke, can you just give me couple of thousands of dollars, so I don't have
to work? Just mail it to me.
1) What word becomes shorter if you add a letter to it?
[ Solved by : niek_e, Paul Thompson, SgtMe, murtan, xavier666, jonsca]
2) What does this sequence equal to : (.5u - .5a)(.5u-.5b)(.5u-.5c) ...
[*solved by : murtan, xavier666]
3) What is the 123456789th prime numer?•
•
Join Date: Oct 2009
Posts: 2
Reputation:
Solved Threads: 0
-2
#4 Oct 10th, 2009
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
•
•
Join Date: Oct 2009
Posts: 27
Reputation:
Solved Threads: 2
0
#6 Oct 11th, 2009
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...
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
C++ Syntax (Toggle Plain Text)
#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
Last edited by triumphost; Oct 11th, 2009 at 4:29 am.
•
•
Join Date: Oct 2009
Posts: 27
Reputation:
Solved Threads: 2
0
#7 Oct 11th, 2009
//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;
}
//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;
}
![]() |
Similar Threads
- Please Solve my some Questions (Assembly)
- Solved Threads (DaniWeb Community Feedback)
- My 999th post (Geeks' Lounge)
- perl for software testing (Perl)
- Suggest me what other resources should i need to have? (Java)
- Suggest me what other resources should i need to have? (Java)
- Problems on WinXP with Spyware/Adware, PopUps, etc. (Viruses, Spyware and other Nasties)
- XCS TechSupport Forums (Website Reviews)
Other Threads in the C++ Forum
- Previous Thread: Help with a circular linked list
- Next Thread: Why I can't compile a helloworld with Unicode supported by wxDevC++?
| Thread Tools | Search this Thread |
Tag cloud for C++
api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code compile compiler console conversion convert count data delete deploy dll download dynamic dynamiccharacterarray email encryption error file format forms fstream function functions game givemetehcodez graph gui homeworkhelp iamthwee ifstream input int java lib library linker list loop looping loops map math matrix memory microsoft newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference rpg simple sorting string strings temperature template templates test text text-file tree url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets






