Im usind Dev-C++ and it allows to return more than 1 value :eek:. ok, so here's my code :
#include <iostream>
using namespace std;
int intFirst, intSecond, intThird;
int BreakUp(int intNumb) {
intFirst = intNumb / 100;
intSecond = (intNumb - (intFirst * 100)) / 10;
intThird = intNumb - ((intFirst * 100) + (intSecond * 10));
return(intFirst, intSecond, intThird);
}
int main()
{
int a;
cout<<"Enter number between (0-999) to break up: ";
cin>>a;
BreakUp(a); //calling
cout<<"=========================="<<endl;
cout<<"First integer: "<<intFirst<<endl;
cout<<"Second integer: "<<intSecond<<endl;
cout<<"Third integer: "<<intThird<<endl;
system ("PAUSE"); //I know, so just ignore it=)
return(0);
}