English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

like calculating time, distance, intrest, temperature, salaries and etc. i just been given some sites but no help so far,

2006-10-16 01:48:02 · 3 answers · asked by Gv g 1 in Computers & Internet Programming & Design

3 answers

What sort of background of C programming do you have? I would suggest to go through Herbert Schieldts "Teach yourself C" book. It is better to go for books to learn programming rather than sites.

2006-10-16 01:54:19 · answer #1 · answered by The Potter Boy 3 · 0 0

C has the common math operations that you'll find in other programming languages, and solving equations involves writing down the algebraic formulas. For example, d = r * t becomes something like:

float d, r, t;

r = 100;
t = 2.5;

d = r * t;

The part that's not so intuitive is how does one make square roots, logarithms and other operations that have no keyboard symbols.

There are functions, like on a calculator, which can calculate those for you. You don't have to write them, the standard ones are included. For example:

double my_number = 12345678.5;

double square_root_of_my_number;

square_root_of_my_number = sqrt( my_number );

If your problem is that you're completely new to C and progamming, then I agree with the previous answer that you should get a good book and become more proficient at the basics of the language.

But I know that beginners at anything, even music, karate, meditation, are seldom interested in spending ages on the baby steps and want to do cool things. Here's a link to a site that might help you with lots of calculation issues:

http://www.numerical-recipes.com/

2006-10-16 02:07:01 · answer #2 · answered by waghdude 2 · 0 0

there is not any absolute, accepted 'least puzzling' language. some are uncomplicated for some human beings to earnings yet no longer relatively uncomplicated for others, and vice versa. Python is possibly one in each and all of the least puzzling to earnings and rather stated for beginners. common is likewise relatively uncomplicated to earnings, yet some human beings have confidence common teaches programmers undesirable habit and ought to as a result be prevented; i'm undecided on that myself. Pascal is with regard to such as common, a minimum of consistent with what I submit to in ideas from my short fling with it. C is a touch harder (yet effective and powerful), and C++ is a touch harder than that (OOP ought to be grotesque to earnings for a beginner). some style of assembly ought to be considered 'optimum puzzling,' in spite of the indisputable fact that that's extremely relatively time-ingesting to code in. you different than for ought to ought to be very careful approximately utilising your archives in its suited context, or you are going to be able to get wildly unpredictable effects (some are relatively incorrect jointly as others can corrupt distinctive archives or possibly crash your gadget). i in my view want assembly via fact it receives rid of each and each and each and all of the abstraction distinctive languages introduce. i'm going to deal with questioning procedurally less difficult than an OOP ideas-set. you are going to be able to additionally do programming with a hex editor, once you're so susceptible. that would in all risk be the foremost puzzling ideas-set in want of utilising binary. to attempt this you will in all risk ought to located in writing your guy or woman compiler/assembler, and you will might have the two an excellent reminiscence or an exceedingly thorough yet exact arranged reference handbook.

2016-12-16 08:29:47 · answer #3 · answered by Anonymous · 0 0

fedest.com, questions and answers