if ( x % 6 == 0 ){ printf( "%d is divisible by 6", x ); } else { printf( "%d is not divisible by 6", x ); }
define program i. program means set of instruction which are required for a particular type of task is called program ii. set of instruction or commands which are given for the computer to do different activity or jobs or works is called program define programming the process of creating/modifying a program; some people's job, others' hobby
OOPS stands for object oriented programming in short . Characteristics of OOPs are : encapsulation, data hiding, polymorphism etc.
echo "Program to check even or odd number"echo "Enter a number"read na=`expr $n % 2`if [ $a -eq 0 ] ; then #Semicolon is most important for Executing ifelse statementsecho "It is an even number"elseecho "It is an odd number"fi
Explain the following terms in the context of object oriented programming. Also explain how these concepts are implemented in C++ by giving an example program for each.
You usually do not need to delete a String, since when the program no longer refers to it, the garbage collector will clean it up.
Sol: 24 = 3 x 8, where 3 and 8 are co-primes. The sum of the digits in the given number is 36, which is divisible by 3. So, the given number is divisible by 3. The number formed by the last 3 digits of the given number is 744, which is divisible by 8. So, the given number is divisible by 8. Thus, the given number is divisible by both 3 and 8, where 3 and 8 are co-primes. So, it is divisible by 3 x 8, i.e., 24.
If the sum of the digits of a given number is divisible by three, the number is divisible by three.
No. A given number need not even be divisible by a given prime.
It is not possible to answer this question. There is no such word as divisble and I am assuming that it is meant to be divisible. However, you cannot "divisible by 4". Divisible by 4 is a property that some numbers have and others don't and you can check if a given number is divisible by 4. Alternatively, you can divide by a given number by 4.
4 is the smallest composite number and it is not divisible by the two given numbers.
The LCM of the given numbers is 12
YES!!! Because the given number ends in '0' .
8.
YES!!!! Any EVEN number is divisible by '2'. NB Even numbers end in 0,2,4,6 & 8. Since the given number ends in '6' then it is an even number.
define program i. program means set of instruction which are required for a particular type of task is called program ii. set of instruction or commands which are given for the computer to do different activity or jobs or works is called program define programming the process of creating/modifying a program; some people's job, others' hobby
To check if a number is divisible by another number, we divide. When we divide, there cannot be a remainder. For example, is 9 divisible by 3? Yes, it is because 9 divided by 3 is 3 without a remainder. How about 4? No, because when we divide 4 by 3 there is a remainder of 1. nycfunction@yahoo.com sum of the numbers in the given digits should be divisible by 3.then we can say that it is divisible by 3.example :22344 is divisible by 3.since2+2+3+4+4=15.so the given digit is divisible by 3
A number which is divisible by itself and 1 is called prime number. A prime number has only two factors.But, 836475 is also divisible by5, i.e. 836475 has more than two factors.Therefore, the given number is not prime.In order to show that given number is not prime there is no need to find all the factors, we should show that given number has more than two factors.