Programming Examples

Cpp program to check number is buzz number or not


Write a cpp  program to input a number form user and check whether number is buzz number or not.

A number is said to be Buzz Number if it ends with 7 or is divisible by 7.

#include
using namespace std;
int main()
{
     int num;
     cout<<"Enter any integer";
     cin>>num;
     if(num%7==0 || num%10==7)
     {
          cout<<"Buzz number";
     }
     else
     {
           cout<<"Not a buzz number";
     }
     return 0;
}
Output

Enter any integer 78

Not a buzz number

Latest Current Affairs 2024 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2024 Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz