1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
timofeeve [1]
3 years ago
13

Write a java program to print the following series: 1 5 9 13 17...n terms​

Computers and Technology
2 answers:
andrew11 [14]3 years ago
6 0

Answer:

In Java:

import java.util.*;

public class Main{

public static void main(String[] args) {

Scanner input = new Scanner(System.in);

int n;

System.out.print("Max of series: ");

n = input.nextInt();

for(int i = 1; i<=n;i+=4){

    System.out.print(i+" ");

}

}

}

Explanation:

This declares n as integer. n represents the maximum of the series

int n;

This prompts the user for maximum of the series

System.out.print("Max of series: ");

This gets user input for n

n = input.nextInt();

The following iteration prints from 1 to n, with an increment of 4

<em> for(int i = 1; i<=n;i+=4){</em>

<em>     System.out.print(i+" ");</em>

<em>}</em>

trapecia [35]3 years ago
4 0

Answer:

In Java:

import java.util.*;

public class Main{

public static void main(String[] args) {

Scanner input = new Scanner(System.in);

int n;

System.out.print("Max of series: ");

n = input.nextInt();

for(int i = 1; i<=n;i+=4){

   System.out.print(i+" ");

}

}

}

Explanation:

This declares n as integer. n represents the maximum of the series

int n;

This prompts the user for maximum of the series

System.out.print("Max of series: ");

This gets user input for n

n = input.nextInt();

The following iteration prints from 1 to n, with an increment of 4

for(int i = 1; i<=n;i+=4){

   System.out.print(i+" ");In Java:

import java.util.*;

public class Main{

public static void main(String[] args) {

Scanner input = new Scanner(System.in);

int n;

System.out.print("Max of series: ");

n = input.nextInt();

for(int i = 1; i<=n;i+=4){

   System.out.print(i+" ");

}

}

}

Explanation:

This declares n as integer. n represents the maximum of the series

int n;

This prompts the user for maximum of the series

System.out.print("Max of series: ");

This gets user input for n

n = input.nextInt();

The following iteration prints from 1 to n, with an increment of 4

for(int i = 1; i<=n;i+=4){

   System.out.print(i+" ");

}

Explanation:

You might be interested in
Your school has been declared a school of technology
Angelina_Jolie [31]
I don't really understand the meaning of the question. Can you reply and i'll try to help...
7 0
3 years ago
What is the purpose of installing updates on your computer?
Lostsunrise [7]

The purpose of adding updates to your computer are as follows:

  • Making sure your computer hardware can run the newest software programs
  • Ensuring the built-in virus protection software is up to date
  • Removing bugs and glitches from your operating system
  • Allowing your computer to run as fast as possible
4 0
2 years ago
Why are the keys on the qwerty keyboard arranged the way they are?
sveticcg [70]
Sholes arranged the keys in their odd fashion to prevent jamming on mechanical typewriters by separating commonly used letter combinations.
7 0
2 years ago
The state licensing bureau recently conducted a survey at Community Hospital. During this review, the surveyors determined that
marshall27 [118]

Answer: Opportunity for Improvement

Explanation:

Any healthcare organization, service, or process that does not reach the established standard or the customer's expectations, is an opportunity for improvement. Furthermore, the Improving Medicare Post-Acute Care Transformation Act (IMPACT) established a quality reporting program aimed to find those opportunities for improvement. Once the problem has been established, is prudent to place an action plan to achieve the desired performance improvement aim.

3 0
3 years ago
What is inputted into a computer system?
Anna [14]

Answer:

Hey mate.....

Explanation:

This is ur answer.....

<em>Input refers to any information, or data, that is sent to a computer for processing. Input is often sent to the computer from a device such as a keyboard, mouse, or other input device. Putting it simple, input is the act of entering data into a computer.</em>

<em />

Hope it helps!

Mark me brainliest....

FOLLOW ME!!!! :)

4 0
3 years ago
Other questions:
  • George borrowed some equipment from his friend for recording his monologue for his art class. He got all the equipment except th
    15·1 answer
  • Suppose you send data to the 11111111 11111111 11111111 11111111 ip address on an ipv4 network. to which device(s) are you trans
    15·1 answer
  • The Internet of Things (IoT) is a concept with emphasis on machine-to-machine communications to describe a more complex system t
    10·1 answer
  • In Florida, you can drive a motorcycle if you have a _____.
    8·1 answer
  • TRUE OR FALSE: Individuals involved in surveillance prior to a terrorist attack are always well-trained and equipped.
    13·1 answer
  • Give a recursive implementation for the function: def is_sorted(lst, low, high) This function is given a list of numbers, lst, a
    10·1 answer
  • An algorithm is defined as a well-ordered collection of unambiguous and effectively computable operations that when executed pro
    10·1 answer
  • A noisy signal has been uploaded to D2L in the files fft_signal.mat and fft_signal.txt.Write a program to estimate the power spe
    10·1 answer
  • Which situations are better suited to an indefinite (while) loop? Select 3 options.
    5·2 answers
  • List any three positive impact of a computer​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!