Answer:
Explanation:
Pink: Down 5 then left 2.
Yellow: Left 3 and down 2.
Green: Right 7, down 4 and left 1.
Purple: Up 6 and left 9.
Red: Left 7, down 5 and left 1.
You can do the last one, blue :)
Answer:
Explanation:
u=up, d=down, r=right, l=left
yellow: l3d2
pink: d5l2
green: r7d4l1
purple: u6l9
red: l7d5l1
blue: r2u7l5
b. fork
c. break
d. loop
Answer:
Option D is correct.
Explanation:
A Loop statment is a control flow statement that repeatedly executes a statement or a series of statements while the value of a specific condition is truthy or until the value of a specific condition becomes truthy.
Answer:
Explanation:
We can divide array A into two arrays B , C
B would contain the sorted n elements.
C would contain the unsorted m elements.
Now we can sort C using merge sort with worst time complexity mlogm.
When you will have array C sorted you can concatenate with B and put it back in A.
Answer:
The period is
The frequency is
Explanation:
The period of both functions will be LCM of both period.
The period of cos is
The period of sin is
Let convert each into degrees.
Find the least common multiple between 36 and 24, which is 72.
Convert 72 into radians
The period is 2pi/5.
The frequency is equal to
1/period.
so the frequency is
Answer: Scope resolution operator(::)
Explanation: A member function and the constructor can be called within the function easily but for the execution of the these components outside the class , a special operator is required to call the functions. The scope resolution operator(::) preceding with the name of class is thus used for defining of the function outside class.This operator maintains the cope of the function and constructor outside the class.
interfaces.
inheritance
polymorphism
Answer: Inheritance
Explanation: Inheritance is the feature that is displayed by the class where it happens to acquire the properties of the other classes and exhibit it. the inheriting nature of the class is seen in two different categories -superclass and subclass. It is a concept that is usually followed in the object -oriented programming. The reason for the inheritance is to reuse the element and their properties of other class.
Answer:
PoLymORpHiSm Kid. Other kid is wrong mark me branliest. TRUST ME
Explanation:
;3
Answer:
import java.util.Scanner;
public class num12 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter the first String");
String word1 = in.nextLine();
System.out.println("Enter the second String");
String word2 = in.nextLine();
System.out.println("Enter the third String");
String word3 = in.nextLine();
//Remove all white spaces
String cword1 = word1.replace(" ","");
String cword2 = word2.replace(" ","");
String cword3 = word3.replace(" ","");
//Comparing the string by their lengths
if(cword1.length()>cword2.length()&&cword1.length()>cword3.length()){
System.out.println(word1+" Is the longest");
}
else if(cword2.length()>cword1.length()&&cword2.length()>cword3.length()){
System.out.println(word2+" Is the longest");
}
else{
System.out.println(cword3+" Is the longest");
}
}
}
Explanation:
Using Java Programming Language
Use the Scanner Class to obtain the String values from the user
Save them in different variables
Use the replace() method in java to remove white space from any of the string entered
Using if and else statements compare the lengths of the strings (word.length()) returns the length of the word.
Print out the word that is longest
NOTE I have compared three Strings, comparing two would have been more straigth forward