#include <cstdlib>
#include <iomanip>
#include <iostream>
using namespace std;
//Function Prototype
bool isMultiple(int X, int Y);
/***************************************Main Function************************************************/
int main()
{
int X;
int Y;
cout << "Please enter your first number ---> " << endl;
cin >> int X >> endl;
cout << "Please enter your second number ---> " << endl;
cin >> int Y >> endl;
isMultiple(int X, int Y);
system ("pause");
return 0;
}
bool isMultiple(int X, int Y)
{
if (int X) % (int Y)= 0
cout << "X is a multiple of Y" << endl;
else
cout << "X is not a multiple of Y" << endl;
}
Ok so i am some what new to the whole c++ scene and im definitely not a guru. and i am supposed to write a program to figure out if one number is a multiple of another. we are supposed to use a programmer-defined function. If anyone could help me i would be very appreciative.
error C2062: type 'int' unexpected (x2)
error C2065: 'X' : undeclared identifier
error C2065: 'Y' : undeclared identifier
error C2448: 'isMultiple' : function-style initializer appears to be a function definition
so these are the error messages im getting when i try to run the program. i tried to change int x and int y to x and y and it does not work. if some one could help me that would be great