1
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
2
Random lnsanity / lol, C++
« on: February 22, 2012, 01:02:46 am »Quote
#include <iostream>
using namespace std;
void divisibleBy (int x){
void divisibleBy (int x){
if (x % 5){
cout << "is divisible by five " << endl;
}else{
cout << "is not divisible by five " << endl;
}
if (x % 10){
cout << "and divisible by ten" << endl;
}else{
cout << "but not divisible by ten" << endl;
}
}
int main()
{
int b;
char Answer;
cout << "Please enter a number" << endl;
cin >> Answer;
divisibleBy(Answer);
return 0;
}
I'm making a function to see if a number the user inputs is divisible by five and ten. The problem I'm having is that no matter what number I put in, it says it's divisible by both five and ten.
Edit: Made that change and now it's telling me numbers that are divisible by five aren't.
4
Tech Trades / Selling tech 6mil/150
« on: April 27, 2011, 12:09:59 am »
I will keep selling to whoever gets the slot until it's time for me to start buying.
All sales final. No refunds.
All sales final. No refunds.