Simple C Program

Started by
17 comments, last by twix 20 years, 6 months ago
The functions Jolly() and Deny() are user-defined functions. If the assignment calls for them, you must have read it earlier.
---------------------Ryan Bujnowicz[ vangelis ]
Advertisement
I thought you needed an int in front of main()....

Charles Hwang -Also/Previously known as Tazel
Personal >>[MonkeyHumor-Under Developement|E-mail]
Programming >>[NeXe|NeHe|SDL]
Resource >>[Google|Dev-C++|GDArticles|C++.com|MSDN]
You don''t have to, normally (unless the compiler is really picky...)

no keyword defaults to ''void'' .. that is... returning no value.
I got it working perfectly. Thanks guys. =)
I''m a major newbie, aspiring game developer. Feel free to E-mail me. Pen pals are wanted! Please be patient with me also! Thank you!
New Question: Assignment #7

My program works fine, but I don''t think I followed the instructions correctly. Please look at my source code and tell me if I followed the instructions correctly. If I didn''t, please give hints and/or examples on how to find the same answer using the correct method.

Instructions (from book): Write a program that calls a function named one_three(). This function should display the word "one" on one line, call the function of two(), and then display the word three on one line. The function two() should display the word two on one line. The main() function should display the phrase starting now: before calling one_three() and display done! after calling it. Thus, the output should look like the following:

starting now:
one
two
three
done!


Here is my pasted source code:

http://rafb.net/paste/results/R2189478.html


Thanks! =)
I''m a major newbie, aspiring game developer. Feel free to E-mail me. Pen pals are wanted! Please be patient with me also! Thank you!
Almost, but you forgot to make the two() function.

Why exactly are you doing exercises on material you haven't read about yet? The previous one specifically asks for user-defined functions, which you say you haven't covered. =\

[edited by - twix on October 12, 2003 4:38:51 PM]
twix, the assignments I''m doing are for the chapter I''ve thoroughly read. I don''t think they covered the user-defined functions very well, but they apparently were covered. It could be just me, but it doesn''t matter anymore because thanks to all the responses I''ve received, I know understand it.

Can you show me how to make the two() function? I''m not sure how they want me to make one_three() call for two().

I''m a major newbie, aspiring game developer. Feel free to E-mail me. Pen pals are wanted! Please be patient with me also! Thank you!
I think I understand what they want. Is this the correct source code?

http://rafb.net/paste/results/Y2992378.html

[edited by - SirDeity on October 12, 2003 5:38:12 PM]
I''m a major newbie, aspiring game developer. Feel free to E-mail me. Pen pals are wanted! Please be patient with me also! Thank you!
That seems right. Nevertheless, I think you should read the chapters much more carefully before you attempt the exercises.

This topic is closed to new replies.

Advertisement