Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Huntger Basinger 3/28/17 Find Digits
- #include <iostream>
- #include <windows.h>
- #include <cstdlib>
- using namespace std;
- #include <time.h>
- void FindDigits(int &number, int &hundred, int &ten, int &one)
- {
- int e,f,g;
- SetColor(5);
- cout<<(number / 100 ) % 100 << endl;
- cout<<endl;
- SetColor(4);
- cout<<(number / 10) % 10<< endl;
- cout<<endl;
- SetColor(3);
- cout<<(number % 10) << endl;
- }
- int main()
- {
- int a, b, c, d;
- cout<<"Please enter a three digit number. " << endl;
- cin >> a;
- FindDigits(a, b, c, d);
- return 0;
- }e
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement