#include <iostream> using namespace std; /* * Author: Andrew Stewart * Date: September 10, 2011 * Purpose: CSC 2700 Sec. 2 Homework * Problem: 11879 - Multiple of 17 */ int main() { istream * in = &cin; char ch; while (1) { in->get(ch); if (ch == '0')break; int n = ch-'0'; while (in->get(ch)) { if (!(ch <= '9' && ch >= '0'))break; n = n*10 + (ch - '0'); if (n>100000000)n%=17; } n = n%17; if (n)cout << 0 << endl; else cout << 1 << endl; } }The statements and opinions included in these pages are those of only. Any statements and opinions included in these pages are not those of Louisiana State University or the LSU Board of Supervisors.
© 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Isaac Traxler