Answer:
import java.util.Scanner;
import java.lang.*;
class Main
{
public static void main(String args[])
{
int n;
//For capturing the value of n
Scanner scanner = new Scanner(System.in);
System.out.println("Enter the value of n:");
//The entered value is stored in the var n
n = scanner.nextInt();
int k=1;
printnum(n,k);
}
public static void printnum(int n,int k)
{
if(n%2==0)
{
for(int i=k;i<=n-1;i=i+2)
{
System.out.print(i);
}
System.out.println("");
}
else
{
for(int i=k;i<=n-1;i=i+2)
{
System.out.print(i);
}
System.out.println("");
}
n--;
if(n<=1)
{
System.exit(0);
}
else
{
printnum(n,k+1);
}
}
}
Explanation:
The program is self explanatory.
This question is incomplete because the options are missing; here are the options for this question:
Which of the following is the most effective way for Velma to save money each month?
A. Automatically reroute a portion of her paycheck to her savings account.
B. Manually deposit 10% of her paycheck in her savings account.
C. Pay all of her bills and then place the remaining money in her savings account.
D. Pay all of her bills and then place the remaining money in her piggy bank.
The correct answer to this question is A. Automatically reroute a portion of her paycheck to her savings account.
Explanation:
In this case, Velma needs to consistently save money for her vacation as this guarantees she will have the money for the trip. This means it is ideal every month she contributes consistently to her savings for the vacation.
This can be better be achieved by automatically rerouting a part of her paycheck for this purpose (Option A) because in this way, every month the money for the vacations will increase and the amount of money will be consistent, which means Velma will know beforehand the money she will have for the vacation. Moreover, options such as using a piggy bank or paying the bills and using the rest for her savings, do not guarantee she will contribute to the savings every month, or she will have the money she needs at the end.
Answer: what do you mean exactly?
Answer: ANSWER is B I'm pretty sure
Explanation: hope this help
s :)