1
New Member Portal / Re: If you are new look here.
« on: January 30, 2015, 09:04:17 am »
Hi I am new here.
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.
#include <iostream>
using namespace std;
void divisibleBy (int x){
if (x % 5==0){
cout << "is divisible by five " << endl;
}else{
cout << "is not divisible by five " << endl;
}
if (x % 10==0){
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;
}
Write a C++ function called divisibleBy that takes an integer as a parameter, and prints out the integer and then "is divisible by five" if the integer is evenly divisible by 5, otherwise it prints "is not divisible by five". If the number IS evenly divisible by 5, also print " and divisible by ten" if it is also divisible by 10, otherwise print " but not divisible by ten".
#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;
}
Durarara!! is really the anime from the last couple years that is actually good.
I just looked at the summer/fall anime seasons... it's all so shitty.
never heard of it