by Dinesh Thakur Category: Control Structures

 

#include<iostream.h>
#include<conio.h>
void main()
{
           int n;
           clrscr();
           cout<<"\n Enter the Number :";
           cin>>n;
           if((n%3==0)&&(n%5==0))
            {
                   cout<<"\n Its Divisible by 3 and 5.";
            }
          else
           {
                  cout<<"\n Its not Divisible by 3 and 5.";
            }
         getch();
}

Verify is A Number is Divisible By 3 & 5 Or Not



About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.



Related Articles