Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- char a;
- int b;
- cin.get( a);
- b = a - 48;
- while (a != '\n')
- {
- cin.get(a);
- if (a == '\n')
- {
- if (b % 2 == 0)
- {
- cout << "even";
- return 0;
- }
- else
- {
- cout << "odd";
- return 0;
- }
- }
- b = a - 48;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement