|
Search Tech-Forums - link takes you to our Forum's search page. Note: The following is only a text archive! To view the actual forum discussion, please visit our website at http://www.tech-forums.net Pages:1 C++ lessons(Click here to view the original thread with full colors/images)Posted by: gab00n I have some basic c++ stuff sitting around that i will post here, i will have to write lesson 1 again as i lost it. I am also going to start on some new ones. These lessons are intended for novices. Posted by: gab00n Lesson 3 Posted by: gab00n Lesson 4 Posted by: strifer Hi. I just wanna know if the formula for the monthly payment in lesson3 is correct? supposedly the answer would be 1072.30 when i use the test inputs right? I tried it in a calculator and my answer is 140.52. My program also produce the same result... I wonder if that is correct? here's my code: #include <iostream.h> #include <stdlib.h> #include <math.h> int main() { char surname[20],firstname[20]; double monthlyPmt,rate,term,LoanAmt,Frate,Fterm; cout<<"This program will compute for our monthly payment."; cout<<"\nKindly fill up necessary fields."; cout<<"\nSurname :"; cin>>surname; cout<<"First name :"; cin>>firstname; cout<<"Loan Amount :"; cin>>LoanAmt; cout<<"Term (years) :"; cin>>term; cout<<"Rate :"; cin>>rate; Frate= (rate/100)/12; Fterm = term*12; monthlyPmt =( Frate*(pow(1+Frate,Fterm)) / pow(1+Frate,Fterm-1) ) * LoanAmt; cout<<monthlyPmt; system("PAUSE"); return 0; } thanks :) Posted by: gab00n monthlyPmt =( Frate*(pow(1+Frate,Fterm)) / (pow(1+Frate,Fterm)-1) ) * LoanAmt; See if that formula works. Posted by: strifer It works now. my bad. thanks... . didn't understand the formula exactly. Posted by: DJ-CHRIS Looks good thanks :) Where's lesson 1? Posted by: strifer No idea. :) I hope gab00n will post more tutorials, like tetris like game. And some problem solving of course. :) Posted by: gab00n Yeah i have to write the first lesson again, and i will write some more soon. This weekend i will have some free time so check in on Sunday. Posted by: strifer Thanks. I'll make sure to check that out. May I request for simple game making tutorials and simple AI. Like tic tac toe? Thanks. Uou're the best :) Posted by: gab00n Ok i will keep that in mind for future tutorials. Posted by: MikePB3 man u helped me a lot but wheres #1 thanks man u've been a big help Posted by: gab00n Yeah i lost it so i will write it again, i will have free time tomorrow so i can get started on it and the others as well. Posted by: gab00n Here is lesson 1 Posted by: MikePB3 thnaks ur the man helps me a lot Posted by: contry ohh cool just what i was lookig for :) Posted by: Snake-Eyes Quick question, what exactly denotes a "novice?" Posted by: Apokalipse errr. someone who is learning the basics? thanks for making these, I hope I can find the time to go through them. I haven't got a lot ATM. Posted by: chickenfoot wow thanks. i've always wanted to learn c++ but didnt want to buy a book. Posted by: shakesadhik Thanks Sadhik Posted by: Chankama [QUOTE][i]Originally posted by chickenfoot [/i] [B]wow thanks. i've always wanted to learn c++ but didnt want to buy a book. [/B][/QUOTE] Without a book, you can't really "learn" C++. Well, if an intro is all you want, then I guess you won't need one. vBulletin Copyright ©2000 - 2003, Jelsoft Enterprises Limited. PPC Management vB Easy Archive Final - Created by Xenon |