wcypierre

[c++] display num in octal

Feb 24th, 2012
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.24 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main(int argc, char* argv[])
  7. {
  8. int num=0,rem;
  9.  
  10. cout<<"Enter a Number:\n";
  11. cin>>num;
  12. /*
  13. Your code goes here
  14. */
  15. cout << oct;
  16. cout<<"Octal number:\n" << num;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment