Answer:
b) num % 2 ==1;
Explanation:
Which code segment results in "true" being returned if a number is odd? Replace "MISSING CONDITION" with the correct code segment.
I've included my code in the picture below. Best of luck.
Answer:
False
Explanation:
The scheme where you can find the greatest common divisor (GCD) of two integers by repetitive application of the division algorithm is known as Euclidean Algorithm.
The Euclidean Algorithm for calculating GCD of two numbers X and Y can be given as follows:
- If X=0 then GCD(X, Y)=Y since the Greatest Common Divisor of 0 and Y is Y.
- If Y=0 then GCD(X, Y)=X since the Greates Common Divisor of 0 and X is X.
- Let R be the remainder of dividing X by Y assuming X > Y. (R = X % Y)
- Find GCD( Y, R ) because GCD( X, Y ) = GCD(Y, R ).
- Repeat the above steps again till R = 0.
Answer:
INPUT "What is the amount of rupees you want converted into paisa"; rupees
paisa = rupees*100
PRINT paisa
Explanation:
done in QBASIC
the semicolon in the 1st line makes the question have a ? at the end. the rupees key word in the 1st line saves the input as a variable
then the second line multiplies by 100 since there are 100 paisa in 1 rupee
Answer:
Seek time measures the delay for the disk head to reach the track. A rotational delay accounts for the time to get to the right sector.
Explanation: