The pseudocode to find the sum of all integers that are multiples of 9, from 1 to 250.
totalSum = 0
for i from 1 to 250{
if i is divided by 9 and remainder is 0{
totalSum = totalSum + i;
}
}
print(totalSum)
in python language the code will be
totalSum = 0
for i in range(1,250):
if i%9==0:
totalSum += i
If you will run the program , the answer would be 3402.
Answer:
The missing code to this question is g.
Explanation:
In this question firstly import packages. Then declaration of the class Test that inherits the JApplet. In this class, we declare the default constructor. In this constructor, we call the add function. Then we declare another class that is SquarePanel. This class inherits JPanel. In this class, we define a method that is paintComponent(). In this method, we define an integer variable. In this method, we perform calculations and pass it to another function that is displaySquares(). In this function, we pass the value as the arguments. So in question the missing code or argument is g.
#4 is true
We use pseudocode to help us understand code.
#5 is false
Strings are surrounded by quotes, integers are not.
#6 is 100.
Integers are numbers with no decimal places.
Answer:
Option b It executes a new process, which runs at the same time as the parent
Explanation:
The exec is one of the Java Runtime methods which is used to create a new process and run it as an separate process. Exec method executes the string command that we place inside the bracket. For example,
Process proc = Runtime.getRuntime().exec("Notepad.exe");
The statement above offers a convenient way to open the another computer software such as Notepad when running the program.