I tried the following:
/* a function that tests whether an integer is even, returning a true or false
answer */
#include <iostream>
using namespace std;
Type: Posts; User: giggsy
I tried the following:
/* a function that tests whether an integer is even, returning a true or false
answer */
#include <iostream>
using namespace std;
Hi. I need to write a function that tests whether an integer is even or not. This is how far I've got. I wasn't sure if its best to use an 'if' statement in the function.
/* a function that...
Thanks for everyone's help!
Thanks orbitz it works fine. Can someone explain to me what the following line does and how it works:
for(int i = 0; i < n; i++)
I haven't studied it yet on my course.
Cheers.
Ok. I tried the following:
/* a function to write a string a given number of times, as specified in a
second parameter */
#include <iostream>
#include <string>
using std::cout; ...
Thanks Monster. The first suggestion worked fine. But the second one didn't work. This is how I implemented it:
/* a function to write a string a given number of times, as specified in a
...
Hi. Here is another question. I'm trying to write a function that will write a string a given number of times (specified by user). How would I do this?
/* a function to write a string a given...
Thanks for the quick reply SilentStrike.
The ACCU website has very good reviews and recommendations for C++ books.
Check it out at:
http://www.accu.org/bookreviews/public/reviews/0sb/index.htm
Click on 'advance C++' or 'beginner's...
Thanks for your reply guys. Will do as you have requested. In the meantime I have another question.
I have to write suitable variable declarations and C++ boolean expressions to test the...
Hi. I'm new to C++ and I would really appreciate if someone could help me out with a program I'm writing. I want to write a program that needs to calculate working hours at the workplace.
1. It...