1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
//
// main.cpp
// assignment 13
//
#include <iostream>
using namespace std;
void separate(int a, int b, int c, int d);
bool breakThree(int num, int &a, int &b, int &c);
int main(int argc, const char * argv[])
{
int num, a, b, c;
cout << "enter a three digit number" << endl;
cin >> num;
breakThree(a, b, c)
return 0;
}
bool breakThree(int num, int &a, int &b, int &c)
{
num = a % 10;
c = (a / 10) % 10;
b = a / 100;
return num;
}
|