Answer:
System.out.println("October is the "+monthSales[9]+"th Month of the year");
A complete Java program is given in the explanation section.
Explanation:
public class num4 {
public static void main(String[] args) {
int [] monthSales = new int[12];
int i=0;
for(i = 0; i<monthSales.length; i++){
monthSales[i] = i+1;
}
System.out.println("October is the "+monthSales[9]+"th Month of the year");
}
}
In the code above, we created an an array of size 12 with this statement
int [] monthSales = new int[12];
using the for loop, the numbers 0-12 are added to the array corresponding to the twelve months in the year
The statement System.out.println("October is the "+monthSales[9]+"th Month of the year"); outputs the corresponding number to October
Answer:
1. An engaging app idea
2. Sufficient funds
3. Cross-platform apps
4. Interactive apps
5. Application content management
ETC...
E
According to the question,
The amount of investment money is $10,785 and the rate of interest is 1.0275%. The amount of money will be multiplied with the rate of interest and the year.
To get future value of the investment it will be like
FV = PV(1+i)x
Therefore , Future value = 10,785(1.0275)x
Answer:
// here is code in java.
// import package
import java.util.*;
// class definition
class Main
{
// main method of the class
public static void main (String[] args) throws java.lang.Exception
{
try{
// print the name
System.out.print("my name is Sam. ");
// print the major
System.out.print("my major is CS.");
}catch(Exception ex){
return;}
}
}
Explanation:
In java, System.out.print() will print the statement but didn't go to the next line.If there is another System.out.print(), then it will also print into the same line.So here first the System.out.print() will print the name and second will print the major in the same line.
Output:
my name is Sam. my major is CS.