write a program to check whether a number is divisible by 5 or not
Answers
Answered by
1
Answer:
mark me i neede
Explanation:
To check divisibility with 5 and 11 both, check if((num % 5 == 0) && (num % 11 == 0)) , then number is divisible by both 5 and 11
Answered by
3
Answer:
Note: I am using C++ language.
#include<iostream>
using namespace std;
int main() {
int x;
cout<<"Enter a number: " ;
cin>>x;
if( x%5==0 ){
cout<<"The entered number is divisible by 5. " ;
}
else {
cout<<"The entered number is not divisible by 5." ;
}
return 0;
}
If you have doubt then let me know and I will try to clarify your doubts.
Please follow me and mark this ans as Branliest answer.Thank you!
Similar questions