topical media & game development
basic-program-solutions-02-Soln2-2.c
? /
basic-program-solutions-02-Soln2-2.c
// Soln2_2.cpp
include <iostream>
using std::cin;
using std::cout;
using std::endl;
int main()
{
int number;
cout << "Enter a number: ";
cin >> number;
cout << "Thank you. The remainder after dividing your number by 8 is "
<< number - ((number >> 3) << 3);
cout << endl;
return 0;
}
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.