Study guides

☆☆

Q: Write a program to enter a number and check whether number is divisible by 7 or not?

Write your answer...

Submit

Still have questions?

Related questions

maa ki aank

void main(){ int i,j; scanf("%d",&i); if((i%5)==0) printf("the given number is divisible by 5); }

To write a program to check whether a particular number is a multiple of 5, or any other number for that matter, you check to see if the first number, modulus the second number, is zero.if (N % 5 == 0) { /* N is divisible by 5 */ }If you don't have the modulus (%) operator, you can use the explicit expressionif (N - int (N / 5) * 5 == 0) { /* N is divisible by 5 */ }

write a c++program by using if statement to read a number and check whether it is positive or negative

bool isNumberDivisibleByFive(int number) { return(!(number % 5)); }

234

You write a for loop. Either increment the variable by 2 at a time, or increment it by 1 at a time, but inside the loop, test whether the number is divisible by 2.

15

any integer is input through the keyboard. write a program to find out whether it is an odd number or even number using if else statement in c#.

if ( x % 6 == 0 ){ printf( "%d is divisible by 6", x ); } else { printf( "%d is not divisible by 6", x ); }

No.

What for? There is only a 154 inside that is divisible by 77...

People also asked