#include<stdio.h>
#include<conio.h>
#include<string.h>
int main (void) {
char arry[100];
int i,count=0;
float a,b;
printf("Enter a 2 Number ");
scanf("%d %d",&a,&b);
if(a%b == 0){printf("its divisible");} else {printf("its not divisible"); }
getch();
return 1;
}
There are many ways to do it.
#include
int main()
{
int m, n;
printf("Enter the values for M and N\n");
scanf("%d %d", &m, &n);
if (m / n!=1)
printf("divisible\n");
else
printf("not divisible\n");
}
Loop through some numbers - for example, 2 through 100 - and check each one whether it is a prime number (write a second loop to test whether it is divisible by any number between 2 and the number minus 1). If, in this second loop, you find a factor that is greater than 1 and less than the number, it is not a prime, and you can print it out.
In C, there will be a part like this:char s1[] = "END";char s2[] = "REVEREND";size_t l1, l2;l1= strlen (s1);l2 = strlen (s2);if (l1>=l2 && strcmp (s1, s2+(l2-l1))==0) puts ("Yeah");
#! /usr/bin/env rubyn = gets.to_id = 'is not'd = 'is' if n % 7 == 0puts 'Your number ' + d + ' divisible by seven.'For more accurate answer, please define the programming/script language you plan to use..
its nice
Accept 3 natural numbers and check whether it firms pythagorean triplet
If the sum of its' digits are divisible by 3 for all numbers greater than 9.
All numbers are divisible by all numbers... They may turn out like decimals and imaginary numbers, but they can be divided. Now, whether 3 can be evenly divided into 6008 is a different question. And that answer would be no.
The answer depends on whether or not the divisor is divisible evenly by the prime.
You can check each individual number, whether it is a prime number. For numbers below 100, it is enough to check whether they are divisible by 2, by 3, by 5, and by 7. If a number is divisible by none of these, it is a prime number.
That's a more or less arbitrary name given to numbers, to distinguish whether they are divisible by 2 (even) or not (odd).
Prime numbers are not divisible by any number other than 1 and themselves. They cannot be divisible by 6.
4059 / 11 = 369 So the answer is yes. Any number is divisible by any other number, it depends on whether the answer is to be in whole numbers without a remainder, or a decimal, etc.
Yes, by 250. Here's a trick I use to find out whether a number is divisible by 3. If you add up all the digits of the numbers it may equal a multiple of 3, if it does it's divisible by 3. For example. 750: 7+5+0=12, which is divisible by 3.
Yes. To find out whether or not a number is divisible by 2, look at the last number. If the last number is a 2,4,6,8, or 0, it is divisible by 2 (it's also an even number). If the last number is 1,3,5,7, or 9, it is NOT divisible by to (those are also odd numbers).4783028 is divisible by 2.
you add the numbers together and if that is divisible by three then so is that number for example: the number 111, you would do 1+1+1=3 so 111 is dividable by 3; or the number 1,620, 1+6+2+0= 9 (which is divisible by 3) so 1,620 is divisible by 3
It is not.
The trick to determining whether a number is divisible by 9 is to add all the individual numbers of the large number together and see if the result is divisible by 9. Let's add 5 + 8 + 9 + 0 = 22. Since 22 is not neatly divisible by 9, then we know that the larger 5890 is also not divisible by 9. Of course, you can divide it by 9, but there will be something left over.