Skip to content

Instantly share code, notes, and snippets.

Created October 16, 2012 22:04
Show Gist options
  • Save anonymous/3902344 to your computer and use it in GitHub Desktop.
Save anonymous/3902344 to your computer and use it in GitHub Desktop.
C++tempcode
#include <iostream>
using namespace std;
int value;
void calcdiv(int number)
{
for (int i=1;i<=number/2;i++)
{
if (number % i == 0)
{
value+=1;
}
}
}
int main()
{
int number1;
int number2;
cout<<"numbers plz\n";
cin>>number1>>number2;
calcdiv(number1);
calcdiv(number2);
cout<<value;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment