x=(728*y)/1000;
OK, so how far did you get, and where did you get stuck? If you've spent hours on them you must have *something* to show for it. Even if you...
No. Programming is all about doing stuff yourself. Go and learn the language, and you'll be surprised how soon you can in fact do these three...
Best bet is to go on a programming course, or get tuition off someone you know. It's not easy to teach C in a forum like this. Failing both of...
Polymorphism works when you can do everything you want to every object through the interface defined in the base class. Once you start trying to...
Easy enough. How far have you got and where are you stuck? The second one is particularly easy - can be done in just 2 lines of code, however...
Interesting. Did you get any warnings from the compiler, such as "condition is always true"? If not, try switching warnings to the maximum...
Yes, you are now using it. It's "more satisfying" though to do what I suggested and manage a bunch of Human*Ships using a collection of pointers...
You need a few more things before polymorphism can work here. - HumanFighterShip and HumanShip need an implementation of printStats() - an array...
It's easy enough. How far have you got and where are you stuck? Do you understand the requirements? Could you do it on paper?
Your first printf has too many parameters. printf ("Number[%d]= %u\n", i, rand () % 40+1,&rndm_array[idx]); %d prints i, %u prints...
Well I can't help if you won't answer my questions.
Exactly the same. You can think of C++ as a superset of C - most things will work the same way.
What output do you get, and what output did you expect?
You're displaying the contents of rndm_array[idx] before you assign it a value. Also lookup the comma operator, because the code...
The problem is in the use of the post-increment operator. Don't use it until you are completely familiar with its use because it will confuse...
"not compiling" is no help at all. It gives us no clue what might be wrong. What errors do you get? Copy and paste the top five *exactly* and...
yool av a long wait, innit, whatever, know what I mean.
Please read the posting guidelines.
How far have you got and where are you stuck? Do you understand the requirements? Have you decided on an algorithm yet?
Separate names with a comma.