Write a C++ Program to verify is a Number is divisible by 3 & 5 or Not.


SUBMITTED BY: Nrupeshsinh

DATE: June 23, 2016, 10:20 a.m.

FORMAT: Text only

SIZE: 264 Bytes

HITS: 897

  1. # include<iostream.h>
  2. # include<conio.h>
  3. void main()
  4. {
  5. clrscr();
  6. int n;
  7. cout<<"Enter a Number :";
  8. cin>>n;
  9. if(n%3==0 && n%5==0)
  10. {
  11. cout<<"Number is divisible by 3 & 5";
  12. }
  13. else
  14. {
  15. cout<<"Number is Not divisible by 3 & 5";
  16. }
  17. getch();
  18. }

comments powered by Disqus