TheAlgorithms-C-Plus-Plus/others/Buzz_number.cpp
Christian Clauss ac1ba3a613
rename Others -> others (#648)
* rename Others -> temp

* rename Others -> others
2019-11-28 13:29:54 +01:00

18 lines
357 B
C++

//A buzz number is a number that is either divisble by 7 or has last digit as 7.
#include <iostream>
using namespace std;
int main()
{
int n, t;
cin >> t;
while (t--)
{
cin >> n;
if ((n % 7 == 0) || (n % 10 == 7))
cout << n << " is a buzz number" << endl;
else
cout << n << " is not a buzz number" << endl;
}
return 0;
}