From 26184828408a1c9d88e7ccc6d57e4c1206f3f77a Mon Sep 17 00:00:00 2001 From: Shivam Singhal Date: Sun, 4 Jun 2017 14:12:56 +0530 Subject: [PATCH] Added buzz number program. --- .DS_Store | Bin 14340 -> 14340 bytes Buzz_number.cpp | 17 +++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 Buzz_number.cpp diff --git a/.DS_Store b/.DS_Store index 39daaec68403ee578354fe1cf49b731ffa1c78fd..50e1f7cb64997ecc4a3d4bab43a2d59b6122bc9e 100644 GIT binary patch delta 199 zcmZoEXepSmkL7CErU@G_nz2uOz`vQD!-|h_!e%G2$DEd2RtFgv7+4te7}6Os8A@{V zU0hO1OOhEFKpKEDC~_%Ca+Bi}q?vdNHdiaCurcw~OPF|>H!gA&RZM(?|syckR`EaFB bp~?2@e2fi~6;-u2SE{S=lcZyErFu62f@VV^ diff --git a/Buzz_number.cpp b/Buzz_number.cpp new file mode 100644 index 000000000..3d39c50f6 --- /dev/null +++ b/Buzz_number.cpp @@ -0,0 +1,17 @@ +//A buzz number is a number that is either divisble by 7 or has last digit as 7. +#include +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; +}