Program to calculate series 10+9+8+...+n" in java with output

Answers

Answer 1

Answer:

import java.util.Scanner;

class Main {

 public static int calcSeries(int n) {

   int sum = 0;

   for(int i=10; i>=n; i--) {

     sum += i;

   }

   return sum;

 }

 public static void main(String[] args) {

   Scanner reader = new Scanner(System.in);

   int n = 0;

   do {

     System.out.print("Enter n: ");

     n = reader.nextInt();

     if (n >= 10) {

       System.out.println("Please enter a value lower than 10.");

     }

   } while (n >= 10);

   reader.close();

   System.out.printf("sum: %d\n", calcSeries(n));

 }

}


Related Questions

Select all steps in the list below that should be completed when using the problem-solving process discussed in this chapter.


Take action.

Take a break.

Evaluate.

Complete the task.

Consider solutions and list ideas.

Understand the task or need.

Ask a coworker for help.

Answers

Take action.

Evaluate.

Complete the task.

Consider solutions and list ideas.

Understand the task or need.

1011111 ÷ 11 in numerical​

Answers

Answer:

91919.18182

Explanation:

Answer:

91,919 .1

HOPE IT HELPS .

At the Greene City Interiors branch office, you have been asked to implement an IP network. Your network ID is currently192.168.1.0/24. You need to divide this in half network (two subnets) to accommodate hosts on two separate floors of the building, each of which is served by managed switches. The whole network is served by a single router.
Based on the above scenario, answer the following questions:
1. To divide the network in half, what subnet mask do you need to use?
2. What are the subnet IDs for each network?
3. Your manager is not satisfied with the new subnet scheme and wants to reduce the number of subnets to make more hosts and addresses available in each subnet. Is there a way to use the same subnet for the two floors of the office?

Answers

Answer:

3 is your correct answer

Binary search is a very fast searching algorithm, however it requires a set of numbers to be sorted.

a. True
b. False

Answers

I’m sure the answer is true

7. System software is the set of software programs that helps run the computer and coordinates instructions between application software and hardware devices. It consists of the operating system (OS) and utility programs. How does the mindset of the designer affect the design of the operating system (e.g., Windows vs. Linux)

Answers

Answer:

Explanation:

The main goal when designing an operating system (OS) is to make sure that the system is as efficient and intuitive as possible. This is the mindset that designers have when creating the operating system. However, this also creates drastically different designs between designers, mainly because one design structure will feel much more natural and intuitive to one designer but not another. Since the designer's own personal taste/mindset drastically affects the design, most companies find their target audience and survey/test various designs. This is done in order to find what features and styles best fit the vast majority of the people.

In which tab will the user find the Cell Styles gallery?

Answers

Answer:

HOME TAB

IS THE ANSWER ......

Book information (overriding member functions) Given main() and a base Book class, define a derived class called Encyclopedia. Within the derived Encyclopedia class, define a PrintInfo() function that overrides the Book class' PrintInfo() function by printing not only the title, author, publisher, and publication date, but also the edition and number of volumes. Ex. If the input is: The Hobbit J. R. R. Tolkien George Allen & Unwin 21 September 1937 The Illustrated Encyclopedia of the Universe James W. Guthrie Watson-Guptill 2001 2nd 1 the output is: Book Information: Book Title: The Hobbit Author: J. R. R. Tolkien Publisher: George Allen & Unwin Publication Date: 21 September 1937 Book Information: Book Title: The Illustrated Encyclopedia of the Universe the output is: Book Information: Book Title: The Hobbit Author: J. R. R. Tolkien Publisher: George Allen & Unwin Publication Date: 21 September 1937 Book Information: Book Title: The Illustrated Encyclopedia of the Universe Author: James W. Guthrie Publisher: Watson-Guptill Publication Date: 2001 Edition: 2nd Number of Volumes: 1 Note: Indentations use 3 spaces. LAB ACTIVITY 11.14.1: LAB: Book information (overriding member functions) File is marked as read only Current file: main.cpp cin >> numVolumes; main.cpp Book.h 25 26 27 28 29 30 31 32 33 34 35 36 myBook. SetTitle(title); myBook. SetAuthor(author); myBook. SetPublisher(publisher); myBook.SetPublicationDate(publicationDate); myBook.PrintInfo(); Book.cpp Encyclopedia.h myEncyclopedia. SetTitle(eTitle); myEncyclopedia. SetAuthor(eAuthor); myEncyclopedia. SetPublisher(ePublisher); myEncyclopedia. SetPublicationDate(ePublicationDate); Encyclopedia.cpp

Answers

Answer:

hansnmakqkai8aiaiakqklqlqlqlqlqqqw

Which factors are involved in search engine optimization​

Answers

Answer:

A Secure and Accessible Website.

Page Speed (Including Mobile Page Speed)

Explanation:

Select the true statement about the motherboard.


It executes the commands sent to it by the application software.


It acts as a storage point for read-only memory (ROM).


It acts as the working memory of the computer by transferring data from the hard disk for processing.


It provides much of the electrical connection between different computer parts.

Answers

Answer:

it executes the commands sent to it by the applica software .

The motherboard provides much of the electrical connection between different computer parts.

What is a motherboard?

This is known to be a kind of  printed circuit board that is made up of some key parts or aspect of a computer or any kind of device.

Conclusively, it is one that is made up of It connectors that is a place where other circuit boards can be placed and as such act to provides much of the electrical connection between different computer parts.

Learn more about motherboard from

https://brainly.com/question/12795887

#SPJ2

Irene llegó tarde al colegio_______________
ayúdenme


^_^^_^^_^^_^^_^^_^^_^^_^^_^​

Answers

Answer:

Explanation:

Absconding

7. Which control is used to display multiple records in List Form
a) Data Grid View b) Textbox c) Label d) Button

Answers

Answer:

I think a is correct answer.

Answer:

A

Explanation:

Which option is used in order to configure switchboards for a complex database?
Switchboard Manager
Global Options
Quick Search
Database Formatter
worth 100 points

Answers

Answer:

switch board manager

Explanation:

how do you format a cd or a DVD ​

Answers

No. The DVD format can't be read by a CD.

Which statement is most likely to be true about a computer network?

A network can have several client computers and only one server.

A network has to have physical cables connecting the devices in the network.

A network can have several servers and only one client.

A network can consist of a single computer with no other devices in communication with that computer.

Answers

Which statement is most likely to be true about a computer network?

A network can have several client computers and only one server.

Explanation:

a network can have several client computers and only one server

AWS's EC2 is primarily considered which type? OA OB. Maas O Claas O D. None of the above O E. Serverless​

Answers

Answer:

IaaS (Infrastructure as a Service)

"Amazon takes the responsibility of networking, storage, server and virtualization and the user is responsible for managing the Operating System, middleware, runtime, data and application."

Can someone compress this ipv6 address? 558c:0000:0000:d367:7c8e:1216:0000:66be

Answers

558c::d367:7c8e:1216:0:66be

Write an algorithm for a vending machine that sells just one product. The machine flashes a yellow light when the quantity inside is below 40% of capacity​

Answers

Answer:

The algorithm is as follows:

1. Start

2. Capacity = 100%

3. Input Status (True/False)

4. While Status == True

    4.1. Read Quantity (%)

    4.2. Capacity = Capacity - Quantity

    4.3. If Capacity < 40%

          4.3.1 Display Yellow Flash

    4.4. Input Status (True/False)

5. Stop

Explanation:

This starts the algorithm

1. Start

The capacity of the machine is initialized to 100%

2. Capacity = 100%

This gets the status of the sales

3. Input Status (True/False)

The following iteration is repeated until the status is false

4. While Status == True

Read current sales quantity from the user

    4.1. Read Quantity (%)

Remove the quantity from the capacity

    4.2. Capacity = Capacity - Quantity

Check is capacity is below 40%

    4.3. If Capacity < 40%

If yes, display yellow flashes

          4.3.1 Display Yellow Flash

This gets the status of the sales

    4.4. Input Status (True/False)

End algorithm

5. Stop

A security analyst recommends implementing SSL for an existing web service. A technician installs the SSL certificate and successfully tests the connection on the server. Soon after, the help desk begins receiving calls from users who are unable to log in. After further investigation, it becomes clear that no users have successfully connected to the web server since the certificate installation. Which of the following is MOST likely the issue?
A. DA Incorrect firewall rules are blocking HTTPS traffic.
B. Users are still accessing the IP address and not the HTTPS address.
C. DC Workstations need an updated trusted sites list.
D Users are not using tokens to log on.

Answers

C- I think. I hope this helps you.

An engineer is configuring AMP for endpoints and wants to block certain files from executing. Which outbreak control method is used to accomplish this task

Answers

Question Completion with Options:

A. device flow correlation

B. simple detections

C. application blocking list

D. advanced custom detections

Answer:

The outbreak control method that is used to accomplish the task of configuring AMP for endpoints and to block certain files from executing is:

C. application blocking list

Explanation:

The application blocking list creates a list of application files, which the AMP continuously tracks and analyzes to compare the file activities with previous cyber attacks.  Specifically, the AMP for Endpoints is a cloud-managed endpoint security solution, which provides a retrospective alert to prevent cyber-security threats, and rapidly detects, contains, and remediates malicious files on the endpoints.

continuously tracks and analyzes files and file activities across your systems, and compares these events to what preceded or happened in past attacks. If a file exhibits malicious behavior, the AMP provides you with a retrospective alert which enables you to stop a potential threat from succeeding.

Consider an Erlang loss system. The average processing time is 3 minutes. The average inter-arrival time is 3 minutes. The number of servers is 3. What is r (sometimes referred to as the offered load)

Answers

Answer:

r = 1

Explanation:

Average processing time ( p ) = 3 minutes

Average inter-arrival time ( a ) = 3 minutes

number of servers ( m ) = 3

Determine the value of r

r ( offered load ) = p/a

                          = 3 / 3  = 1

∴ value of r ( offered load ) = 1

Which statement is accurate to describe a spreadsheet versus an Excel workbook?
a) worksheets have one or more workbooks.
b) workbooks have one or more worksheets.
c) workbooks are the same as word documents.
d) worksheets always refer to real paper.

Answers

C is the correct answer

what is the python ?​

Answers

Answer:

Python is an interpreted high-level general-purpose programming language. Python's design philosophy emphasizes code readability with its notable use of significant indentation. 

This is my Opinion.

Python is an interpreted high-level general-purpose programming language. Python's design philosophy emphasizes code readability with its notable use of significant indentation.

Hope this helps you :)

11111 Power 2 sovle ​

Answers

123,454,321. you just multiply 11111 by itself

A company is deploying NAFDs in its office to improve employee productivity when dealing with paperwork. Which of the following concerns is MOST likely to be raised as a possible security issue in relation to these devices?
A. Sensitive scanned materials being saved on the local hard drive
B. Faulty printer drivers causing PC performance degradation
C. Improperly configured NIC settings interfering with network security
D. Excessive disk space consumption due to storing large documents

Answers

Answer:

D. Excessive disk space consumption due to storing large documents.

Explanation:

When a company is planning to use NAFDs in its office rather than paper work, the efficiency of employees will increase as unnecessary paper work takes time in handling and printing. When data is stored on disks there is a risk that employees store large or irrelevant files in the disk which will create storage issues.

how to not addUse methods to: 1. Get a String from the user at the command line 2. Populate an ArrayList of Character data (the wrapper class), with each char in the String represented as a separate Character element in the ArrayList 3. Output each Character to the command line, each on a separate line space into my array list

Answers

Answer:

Explanation:

The following code is written in Java. It asks the user to enter a string. Then the program loops through the string and separates the string into an ArrayList of characters. Finally, it outputs each character separately on a its own line.

import java.util.ArrayList;

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter a String: ");

       String answer = in.nextLine();

       ArrayList<Character> charsList = new ArrayList<>();

       for (int i = 0; i < answer.length(); i++) {

           charsList.add(answer.charAt(i));

       }

       for (char x: charsList) {

           System.out.println(x);

       }

   }

}

The speed of a computer is measured in____?​

Answers

Answer:

gigahertz

Explanation:

The clock speed measures the number of cycles your CPU executes per second, measured in GHz (gigahertz)

[tex]\sf{}[/tex]

ANSWER => gigahitrz

Explanation:

The speed of a computer is measured in gigahitrz

What is the definition of: a computer network? data communications? telecommunications? a local area network? a personal area network? a metropolitan area network a wide area network? network management? convergence? g

Answers

Answer:

The answer is below

Explanation:

1. Computer Network: this is a system of interconnection of computers and computing devices that utilizes wires or radio waves over certain reachable locations.

2. Telecommunications: this is known to be the system or combination of telephones device and networks that transmit telephone signals.

3. A local area network: often referred to as LAN, is a system of networks that covers a smaller area usually within a room, floor, building, or campus.

4. Personal area network: often referred to as PAN, this is a network that covers few distances, usually between wireless devices like PDAs, laptops, and other devices.

5. Metropolitan area network: often referred to as MAN, this is a system of the network that serves quite a larger area, usually between that serve an area of 1 to 30 miles radius. For example, a typical city.

6. Wide area network: often referred to as WAN, this is a system of a large network that covers a large area such as parts of states, many states, countries, and the world at large.

7. Network management: this is defined to be a process of designing, installing, and supporting a computer network, such as computer hardware and software

8. Convergence: this is known to be a connection, combination, and integration of two or more computer technologies in a single device or system for operation.

help me please help me please​

Answers

Answer:

3 one is the answer or 4 one

Answer:

none of the above

Explanation:

Every flip flop will divide the frequency by 2, so you need 2 flip flops.

To nest one structure within another structure, you a. define both structures and then create a data member of the nested structure type within the other structure b. create a container that holds objects of the nested structure type and then include the container within another structure c. define the nested structure within another structure

Answers

Answer:

Hence the correct option is option a) define both structures and then create a data member of the nested structure type within the other structure.

Explanation:

To make Address nested to Employee, we've to define Address structure before and out of doors Employee structure and make an object of Address structure inside Employee structure.

For example, we may need to store the address of an entity employee in a structure.

Essay on "Impact of Digitalization"​

Answers

Answer:

Digitization has a proven impact on reducing unemployment, improving quality of life, and boosting citizens' access to public services. Finally, digitization allows governments to operate with greater transparency and efficiency

Other Questions
The concept of _____ emphasizes that changes in cognitive activity patterns might result in disuse and consequent atrophy of cognitive skills. How were the elements in the first periodic table arranged? O A. In order of atomic number B. Alphabetically by element name C. In order of date of discovery O D. In order of atomic mass The reversible reaction, 4HCl(g) + Si (s) SiCl4 (l) + 2H2 (g) , would be classified as a ______________ reaction.exothermicendothermichomogeneousheterogeneous SOMEONE HELP ASAP PLEASEEEEE!!!!! Which of the following statements best characterizes a common trait of genetically modified food and organically grown food?A.Both types of food can require fewer pesticides.B.Both types of food are popular in European countries.C.Both types of food have been improved by natural means.D.Both types of food have been improved by synthetic means. Involves moving a tool across a dry surface to create marks on that surface.PhotographySculpturePaintingDrawing The Rivera family bought a new tent for camping. The front of the old tent is a triangle with equal sides of 3.2 m and a floor width of 4.8 m. If the new tent is similar in shape to the old tent and has equal sides of 4 m, how wide is the floor of the new tent? What's another name for a flowering plant? A. GymnospermB. PolypodiophyteC. AngiospermD. Bryophyte -9(m + 2) + 406 - 7m) Vipsana's Gyro House sells gyros. The cost of ingredients (pita, meat, spices, etc.) to make a gyro is $2.00. Vipsana pays her employees $60 per day. She also incurs a rent of $20 per day. Calculate Vipsana's variable cost per day when she produces 50 gyros using two workers?A) $100 B) $124.40 C) $220 D) $240Calculate Vipsana's total cost per day when she produces 50 gyros using two workers?A) $100 B) $124.40 C) $220 D) $240Calculate Vipsana's average fixed cost per day when she produces 50 gyros using two workers?A) $2.00 B) $2.40 C) $0.40 D) $6.80What is Vipsana's total cost per day when she does not produce any gyros and does not hire any workers?A) $0 B) $2 C) $60 D) $20 After a laser beam passes through two thin parallel slits, the first completely dark fringes occur at 19.0 with the original direction of the beam, as viewed on a screen far from the slits. (a) What is the ratio of the distance between the slits to the wavelength of the light illuminating the slits Will weather change your impact on training for a 5K marathon Whats the main reason why cell specialization is important What is net cash flow Describe how the Supreme Court used Marbury v Madison to define and increase its power and role in our government. In the event of Yan Limeng, through the publicity attribute of social media, the cultural propaganda offensive from Guo Wengui and Ban Nong made immeasurable loss in the process of resisting the epidemic all over the world. Find the probability of 5 successes in 9 trials of a binomial experiment in which the probability of success in any one trial is 37%. Find the domain of the function. Write the answer in interval notation. Graphic showing the following information, Surveyor, Worked hard, Learned to think logically. British army officer, Quit in response to unfair treatment, Was courageous in battle. Commander in chief of Continental Army, Stayed with his troops, Demanded courage and discipline from his men.Which of these would be an accurate caption for this graphic? George Washington gained valuable knowledge from his terms of military service. George Washington had exceptional mapmaking and military abilities. George Washington's life experiences gave evidence that he would be an excellent president. George Washington's success as president was due to his schooling and military training. The graph shows a journey in a car. Which of the statements most likely describes the journey at the portion of the graph labeled J? The car continues its journey because the portion shows a linear function. The car is waiting at the starting point because the portion shows a constant function. The car is traveling the same distance per unit of time because the portion shows a linear function away from the starting point. The car stops a distance away from the starting point because the portion shows a constant function away from the starting point.