Basic C Programming
Link |
by
![]() ![]() |
How to: edit: here's what I did. it's still buggy though, what's wrong with it? C O D E : O U T P U T : ![]() ![]() ----- *fixed* problem solved. :] solution: fAmount → double. ![]() ![]() ![]() m y . L i F E . i . t r a d e . i n . f o r . y o u r . P A i N . |
Re: Basic C Programming
Link |
by
![]() |
This seems to be a simple error.... judging from the fact that the 100 peso bills part outputs the right number (or am I reading the objective wrong?) it seems that the problem has something to do with all of the mod division you're doing (the %'s). I think in this case when it divides the numbers it gives a decimal so you may need to make the variables double rather than int... And just to play it safe I'd use parentheses on the division lines just to make sure it's doing the operations in the right order, though I realize that's probably not what's causing THIS problem.
Beware the quiet people,
You don't know their intentions
(small signatures are sooo much cooler since they don't annoy people trying to read through posts!) |
Re: Basic C Programming
Link |
by
![]() ![]() |
wh0opz~! :O sorry, I solved this problem long ago. :/ there was nothing wrong with the integer values. Solution: the float (fAmount) should be declared and scanned as double. XP ⇑ some kind of C programming bug. o_O I have another question though: Programmed Animation: I know it involves loops and time delay. But I know absolutely nothing about time delay. o__O Care to explain please? :) * I plan to animate using only 2 functions to serve as my frames. Is that possible? D: ![]() ![]() ![]() m y . L i F E . i . t r a d e . i n . f o r . y o u r . P A i N . |
Re: Basic C Programming
Link |
by
![]() |
I now currently just start to learn c++ programming... Did senpai all think that it is an easy course? I had difficulty understand d concept of pre and post increment operator,write a prompt line n understanding d #include i glad if someone would teach me..
COOL...
![]() |
Re: Basic C Programming
Link |
by
![]() |
this C program my friends study it(the computer gifted) but i don't know any of the XD |
Re: Basic C Programming
Link |
by
![]() |
i remmber having this on my computer classes last year o.o" pfft it was so hard! plus the teacher didnt explain the basics to us well! c++ is terrible T___T ![]() ![]() ![]() |
Re: Basic C Programming
Link |
by
![]() |
Hi, I also remember having this classes last year. Umm, for information : programmed animation can be made by visual c++, u can make time delay by using for(); for example ==> for(x=0;x<=10000;x++); I use c++ console for the example. Etto, it will be better if you didn't use variable that confusing For 2 digit in decimal parts : Change %d ==>%0.2f and if you write int nAmt, then don't use %d, but use %i and since it use decimal value, then you can change int to float post increment : you do increment after that line pre increment : you do increment in that line The system will do Increment first, then do the other iterations #include : just a dll library, some function need a particular library to be used Hmm, I hope I can help you again later *bow*. Bye^^. ![]() |
Re: Basic C Programming
Link |
by
![]() ![]() |
since I included <conio.h> (I use a DJGPP compiler) I was thinking I could use usleep() or delay() for the time intervals. :) ![]() ![]() ![]() m y . L i F E . i . t r a d e . i n . f o r . y o u r . P A i N . |
Re: Basic C Programming
Link |
by
![]() |
is anyone knows how to differentiate the usage of if, else and switch, break function in c++ programme. I found tat both look like same.. What it means when v use both function together in a programme? Thanks..i hope my ques solved..
COOL...
![]() |
Re: Basic C Programming
|
Lately I have become very interested in programming. And especially the question of how to code a social media app https://www.programmingassignment.net/blog/how-to-create-a-social-network-app/ I couldn’t figure it out for a long time until specialists could. It’s good that now there is an opportunity to turn to specialists. |
Re: Basic C Programming
|
Hi. If you want to learn how to manage your finances effectively, you should check out https://pocketguard.com/savings-goals/ . It talks about an app that provides indispensable tools to achieve your financial goals. I myself apply these recommendations and see positive results. |
Re: Basic C Programming
|
Basic C programming lays a strong foundation cox internet for understanding computer science principles. With its straightforward syntax and powerful capabilities, C helps beginners grasp key concepts like variables, loops, and functions. Mastering these fundamentals paves the way for more advanced topics and languages. Its efficiency and control over system resources make C an enduring choice for both learning and practical applications |