21 lines
449 B
C++
Raw Normal View History

2020-05-27 18:00:02 -04:00
/**
* @file
* @brief A buzz number is a number that is either divisible by 7 or has last
* digit as 7.
*/
2017-12-23 18:30:49 +01:00
#include <iostream>
2020-05-27 18:00:02 -04:00
/** main function */
int main() {
int n, t;
std::cin >> t;
while (t--) {
std::cin >> n;
if ((n % 7 == 0) || (n % 10 == 7))
std::cout << n << " is a buzz number" << std::endl;
else
std::cout << n << " is not a buzz number" << std::endl;
}
return 0;
2017-12-23 18:30:49 +01:00
}