ㄷㄱㅈㄱㄷㅂㄷㅈㅋㅊㄱㅅㄱㄷㅂㄴㅂㄴㄱㄴㄱㄷㄱㄸㄱㄴㄱㄹㄱㅅㄱㅈㅂㅈㅂㅈㅂㄷㄱㅌㄱㄸㄱㅈㄱㅈㅂㅈㅂㅈㅂㅊㅂㄴㅅㄴㅂㅈㄱㅈㄱㅈㄱㅈㅂㅈㅂㅈㅂㅊㅂㅈㅂㅈㅂㅈㅂㅈㅂㅈㄷㄱㄷㅅㄷㅅㅈㄱㅇㄴㅇㄴ.ㄱㅇㄴㅇㄴㅇㄴㅇㄴㅇㄴㅇㄴㅈㄱㄷㄱㄷㄱㅊㄹ?
Answer:
Following are the code block in the Java Programming Language.
//define recursive function
public static long exponentiation(long x, int n) {
//check the integer variable is equal to the 0.
if (x == 0) {
//then, return 1
return 1;
}
//Otherwise, set else
else {
//set long data type variable
long q = exponentiation(x, n/2);
q *= q;
//check if the remainder is 1
if (n % 2 == 1) {
q *= x;
}
//return the variable
return q;
}
}
Explanation:
<u>Following are the description of the code block</u>.
- Firstly, we define the long data type recursive function.
- Then, set the if conditional statement and return the value 1.
- Otherwise, set the long data type variable 'q' that sore the output of the recursive function.
- Set the if conditional statement and check that the remainder is 1 and return the variable 'q'.
Answer:
ssume that,
Maximum “students” count can be 10.
*Driver Class*
*Solution class*
import java.util.*;
class Student {
private String name;
private int rollNo;
public String getName() {}
public void setName(String name) {}
public int getRollNo() {}
public void setRollNo(int rollNo) {}
};
class ClassRoom {
private int i;
private Student[] students;
public void addStudent(String name, int rollNo) {}
public Student[] getAllStudents() {}
};
Answer:
Hi!
filename.pptx is the correct answer.
Explanation:
- .DOC is a document file extension used by Microsoft Word.
- .TXT is a file extension for a text file used by Notepad.
- .PDF is a file extension related with Portable Document Format used by Adobe Acrobat Reader.
- .PPTX is file extension used by Microsoft PowerPoint Presentation.