Advertisement
jadestorm23

Untitled

Mar 28th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.55 KB | None | 0 0
  1. //Huntger Basinger 3/28/17 Find Digits
  2. #include <iostream>
  3. #include <windows.h>
  4. #include <cstdlib>
  5. using namespace std;
  6. #include <time.h>
  7.  
  8. void FindDigits(int &number, int &hundred, int &ten, int &one)
  9. {
  10.     int e,f,g;
  11.    
  12.     SetColor(5);
  13.     cout<<(number / 100 ) % 100 << endl;
  14.     cout<<endl;
  15.     SetColor(4);
  16.     cout<<(number /  10) % 10<< endl;
  17.     cout<<endl;
  18.     SetColor(3);
  19.     cout<<(number % 10) << endl;
  20.    
  21. }
  22.  
  23. int main()
  24. {
  25.     int a, b, c, d;
  26.     cout<<"Please enter a three digit number. " << endl;
  27.     cin >> a;
  28.    
  29.     FindDigits(a, b, c, d);
  30.    
  31.     return 0;
  32. }e
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement