Write a program to print sum on first 10 natural numbers.
#include
int main()
{
int i, sum;
for(i=1;i<=10;++i);
{
sum =sum + i;
}
printf("The sum is = %d",sum);
}

Answers

Answer 1

A program that prints the sum on the first 10 natural numbers is:

int sum=0;int i=1;for(i=1; i <= 10 ; i++) // the value of i will be from 1 to 10{sum=sum+i; //each number will get added to the variable ‘sum’}System.out.println(sum); //

What is a program?

A computer program in a programming language is a set of instructions and commands written in a language that a computer can execute or understand. 

Using the For Loop program, the variables of the first 10 natural numbers can be written as:

int sum=0;int i=1;for(i=1; i <= 10 ; i++) // the value of i will be from 1 to 10{sum=sum+i; //each number will get added to the variable ‘sum’}System.out.println(sum); //

Learn more about writing a program here:

https://brainly.com/question/23275071


Related Questions

Can someone help me please and please answer all the questions and explain :D

Answers

Answer:

1. is A. 2. is C.  3. is A.

Explanation:

Filters remove all data that does not match the requirements.

1. Explain 'Computer Ethics" ?



plz following me ​

Answers

Answer:

Computer ethics is a part of practical philosophy concerned with how computing professionals should make decisions regarding professional and social conduct.  or the computer experts making the decision regarding the social and professional behaviour while working while with the computer tools and technology is called computer ethics.

Explanation:

What is the correct method to reset the contents of the CMOS NVRAM on HP Desktop / Workstation computers after the AC power has been disconnected

Answers

It should be noted that in order to reset the content of the CMOS NVRAM on HP Desktop, one can turn off the power and turn it back on while the person is holding the shift key.

It should be noted that the non-volatile RAM simply means a complementary metal-oxide-semiconductor chip that can be found inside computers which is vital for storing information.

To reset the content of the CMOS NVRAM on HP Desktop, one can turn off the power and turn it back on while the person is holding the shift key.

Learn more about computers on:

https://brainly.com/question/24540334

a program is under development to keep track of a clubs members

Answers

Answer:

Keep a chart with you

Explanation:

You could right something along the lines of:

To keep track of the members in the club, I'll(we'll) have them write their names down on a chart so we don't forget. I(we) could also just do a thing where I(we) plan everything out beforehand and I(we) have been keeping track of the members.

You could right something along the lines of:

Since the program is under development, I(we) could tell everyone in the club to put their names on a spreadsheet and I(we) could start developing the program further that way.

Even though it would be convenient to build a network with only one transmission medium, why wouldn't it be practical for big corporations?

A.
because they have far too many hackers breaching their security on a daily basis for only one transmission medium

B.
because they prefer a fancier network to match their elite reputation

C.
because they require a combination of transmission media types to function properly

D.
because with such large user-bases, they couldn't afford to build a network with only one medium

Answers

The reason why it wouldn't be practical for big corporations to build a network with only one (1) transmission medium is: C.  because they require a combination of transmission media types to function properly.

A big corporation can be defined as a corporate organization that has facilities and owns (controls) assets that are used for the manufacturing of goods and services in at least one (1) country, other than its headquarter (home office) located in its home country.

This ultimately implies that, a big corporation is a corporate organization that owns (controls) its business operations in two or more countries.

In light of the above, a big corporation require a combination of multiple transmission medium or transmission media types such as the following, in order for them to function properly, effectively, and efficiently:

Fiber-optic cableTwisted pairDigitalAnalogue

Read more on transmission media here: https://brainly.com/question/7120023

This type of RAID implementation uses its own Central Processing Unit (CPU) for calculations on an intelligent controller card by:

Answers

RAID implementation uses its CPU for calculations on an intelligent controller card by a hardware implementation.

Basically, a hardware implementation refers to a job is done using a physical device or electronic circuit rather than been done automatically by the computer program.

Hence, through a hardware implementation, the RAID implementation is able to use its CPU for calculations on an intelligent controller card

Read more about hardware implementation

brainly.com/question/25803633

Why there should be laws against using phones and

driving?

Answers

Answer:

There should be laws against using phones & driving because you can get into an accident & you are not paying attention to the road & it's surroundings.

Explanation:

It is for your safety & other peoples safety around you.

Can someone help me with this please

Answers

Answer:

D

Explanation:

Filters and the Sort feature can be applied in any order. 

What is this on googel documents and how do I fix it

Answers

Answer:

if you're trying to take off the words on the side, when you hover over it, an "X" will appear and you can delete it

Explanation:

What is my mistake in this case?

Answers

Answer:

I think it suppose to be #print out house

Answer:

i guess take the hint, bro.

Explanation:

how to check amazon gift card balance without redeeming

Answers

Answer:

Follow these steps to check your Amazon gift card balance without redeeming.

1. Locate the gift card's claim code. The claim code is on the back of the card (if it's a physical gift card) or on your email or paper receipt (if it's an electronic gift card). The claim code will be 14 to 15 digits long. If it's a physical gift card, you may need to scratch off the protective coating to find the claim code.

2. Sign in to your Amazon account. You can sign in through the website or the mobile app.

3. Search for the word 'help'. Click the search bar, type 'help', and press Enter or Return to search.

4. Click 'Help and customer service'. This option is located at the top of the screen.

5. Talk to a customer support agent.

Mobile app:

Scroll down and click 'Need More Help?'.Click 'Contact Us'.Click 'Something else'.Click 'I need more help'.

Computer:

Click 'Something else'.Click 'I need more help'.

6. Type 'find the balance of a gift card without redeeming' into the message box. Send the message.

7. Request the balance of your Amazon gift card. Provide the claim code and request the balance. The support agent will check the gift card balance associated with the claim code and provide it to you without redeeming the card.

A student is writing a research paper on astronomy. His teacher has asked that she include a visual aid to explain the scientific concepts in her paper. She has chosen to write about the moon, and she wants to use a visual aid to show what the surface of the moon looks like.

Which visual aid would best support her topic?

Answers

Answer: a map showing the different sizes of the moon's craters

Explanation:

the reason for this is because the student wants to show what the surface of the moon looks like.

Ethan is afraid that his poor grades will get him kicked out of his university at the end of the semester. He decided to remotely access the dean's computer and change his grades in the school system. If caught, Ethan will have to confess to committing what?

A.
virtual education

B.
grade hacking

C.
a computer crime

D.
educational fraud

Answers

Answer:

Computer Crime

Explanation:

You're evading someones privacy and gaining access to their computer or device without consent. Therefore, it is a computer crime.

Answer:

Educational fraud

Explanation:

Ethan changed his grades in the school system claiming to have better grades then he really does.

Which CPU characteristic when enabled, doubles the number
of instructions which can be processed at once?

Answers

Answer:

A central processing unit (CPU) is the electronic circuitry within a computer that carries out the instructions of a computer program by performing the basic arithmetic, logical, control and input/output (I/O) operations specified by the instructions. The term has been used in the computer industry at least since the early 1960s. Traditionally, the term “CPU” refers to a processor, more specifically to its processing unit and control unit (CU), distinguishing these core elements of a computer from external components such as main memory and I/O circuitry.

The form, design and implementation of CPUs have changed over the course of their history, but their fundamental operation remains almost unchanged. Principal components of a CPU include the arithmetic logic unit (ALU) that performs arithmetic and logic operations, processor registers that supply operands to the ALU and store the results of ALU operations, and a control unit that fetches instructions from memory and “executes” them by directing the coordinated operations of the ALU, registers and other components.

Most modern CPUs are microprocessors, meaning they are contained on a single integrated circuit (IC) chip. An IC that contains a CPU may also contain memory, peripheral interfaces, and other components of a computer; such integrated devices are variously calledmicrocontrollers or systems on a chip (SoC). Some computers employ a multi-core processor, which is a single chip containing two or more CPUs called “cores”; in that context, single chips are sometimes referred to as “sockets”. Array processors or vector processors have multiple processors that operate in parallel, with no unit considered central.

For Internet Protocol (IP) v6 traffic to travel on an IP v4 network, which two technologies are used? Check all that apply.

Answers

The two (2) technologies that must be used in order to allow Internet Protocol version 6 (IPv6) traffic travel on an Internet protocol version 4 (IPv4) network are:

1. Datagram

2. IPv6 tunneling

An IP address is an abbreviation for internet protocol address and it can be defined as a unique number that is assigned to a computer or other network devices, so as to differentiate them from one another in an active network system.

In Computer networking, the internet protocol (IP) address comprises two (2) main versions and these include;

Internet protocol version 4 (IPv4)Internet protocol version 6 (IPv6)

IPv6 is the modified (latest) version and it was developed and introduced to replace the IPv4 address system because it can accommodate more addresses or nodes. An example of an IPv6 is 2001:db8:1234:1:0:567:8:1.

Furthermore, the two (2) technologies that must be used in order to allow Internet Protocol version 6 (IPv6) traffic travel on an Internet protocol version 4 (IPv4) network are:

1. Datagram

2. IPv6 tunneling

Read more on IPv6 here: https://brainly.com/question/11874164


What is the missing line of code?
22
>>> books = {294: 'War and Peace', 931:'Heidi', 731:'Flicka'}
>>>
dict_keys([294, 931, 731])
O books allo
O books.values()
O books
O books.keys()

Answers

Answer:

books.keys()

Explanation:

I ran the code and the awncers though python and books.keys() is the one that came up with the awncer

books.keys() is the missing line of code with respect to the books with the help of Python language.  Thus, option D is correct.

What is a code?

In a certain programming language, a collection of commands or a collection of rules are referred to as computer code. It's also the name given to the source code just after the translator has prepared it for computer execution.

Code is a developing company that focuses on producing aesthetically pleasing, code-correct internet, application forms, and phone application.

The correct code will be according to the Python language will be in addition to books.keys():

books.keys()

books = {294: 'War and Peace', 931:'Heidi', 731:'Flicka'}

books.keys()

dict_keys([294, 931, 731])

Therefore, option D (books.keys()) is the correct option.

Learn more about code, here:

https://brainly.com/question/17204194

#SPJ2

One of the Windows workstations you manage has four user accounts defined on it. Two of the users are limited users while the third (your account) is an administrative user. The fourth account is the Guest user account, which has been enabled to allow management employees convenient workstation access. Each limited and administrative user has been assigned a strong password. File and folder permissions have been assigned to prevent users from accessing each other's files. Autorun has been disabled on the system.

Required:
What actions is MOST likely to increase the security of this system?

Answers

Answer:

All users on a Windows workstation are limited users except for one user who is responsible for maintaining the system.Explanation:

_____ are fields that are used to personalize a mail merge document
A. rows of a spreadsheet data source
B. Excel workbooks
C. columns of the spreadsheet data source
D. cells

Answers

Answer:

The answer is A; rows of a spreadsheet data source.

Explanation:

Write steps of the following operations.
a. applying borders and spacing
b. create a folder​

Answers

Answer:

b

Explanation:

first right click on an empty space

click on new from the pop up menu

finally click on new folder

EASY 15 POINTS IF YOU CAN HELP
What is the value of the variable named result after this code is executed?

numA = 3

numB = 2

result = numA ** numB

A. 5
B. 9
C. an error has occurred
D. 6

Answers

Answer:9

Explanation:

The value of the variable named result after this code is executed "numA = 3 numB = 2 result = numA ** numB  is 9.

What does value mean?

The value of an output is known to be the sum or the monetary worth of that thing.

Note that looking at the  variable of the code that is executed "numA = 3 numB = 2 result = numA ** numB, we can say that the output is 9.as one can ger it when 3 multiplied itself twice.

Learn more about value from

https://brainly.com/question/843074

#SPJ2

Help to draw in turtle. Python

Answers

Answer:

a basic piece of code:

from turtle import *

color('red', 'yellow')

begin_fill()

while True:

   forward(200)

   left(170)

   if abs(pos()) < 1:

       break

end_fill()

done()

Explanation:

What its doing is The TurtleScreen class defines graphics windows as a playground for the drawing turtles. Its constructor needs a tkinter.Canvas or a ScrolledCanvas as argument. It should be used when turtle is used as part of some application.

The function Screen() returns a singleton object of a TurtleScreen subclass. This function should be used when turtle is used as a standalone tool for doing graphics. As a singleton object, inheriting from its class is not possible.

All methods of TurtleScreen/Screen also exist as functions, i.e. as part of the procedure-oriented interface.

RawTurtle (alias: RawPen) defines Turtle objects which draw on a TurtleScreen. Its constructor needs a Canvas, ScrolledCanvas or TurtleScreen as argument, so the RawTurtle objects know where to draw.

Derived from RawTurtle is the subclass Turtle (alias: Pen), which draws on “the” Screen instance which is automatically created, if not already present.

All methods of RawTurtle/Turtle also exist as functions, i.e. part of the procedure-oriented interface.

Consider the following method, which is intended to return the product of 3 and the nonnegative difference between two int parameters.

public int threeTimesDiff(int num1, int num2) {

return 3 * (num1 - num2);

}
Which precondition is required so that the method works as intended for all values of the parameters that satisfy the precondition?
A. num1 > 0, num2 > 0
B. num1 >= 0, num2 >= 0
C. num1 >= num2
D. num2 >= num1

Answers

Methods are code segments that are executed when called or evoked.

The required precondition for the method to work as intended is (c) num1 >= num2

The return value of the method is given as:

3 * (num1 - num2).

The return value is said to be non-negative.

So, the following condition must be true

[tex]3 \times (num1 - num2) \ge 0[/tex]

Divide both sides of the equation by 3

[tex](num1 - num2) \ge 0[/tex]

Remove the bracket

[tex]num1 - num2 \ge 0[/tex]

Add num2 to both sides of the equation

[tex]num1 \ge num2[/tex]

Hence, the required precondition for the method to work as intended is (c) num1 >= num2

Read more about preconditions at:

https://brainly.com/question/13795586

PLEASE ANSWER (CODING IN PYTHON)


Ask what kind of pet the user has. If they enter cat, print “Too bad...”, if they enter

dog, print “Lucky you!" (You can change the messages if you like). Once this works,

add other pets. (Iguana, Pig, Rabbit...)

Answers

Answer:

Explanation:

a = input("what kind of pet the user has")

if a == 'cat':

  print("Too bad")

elif a == 'dog':

   print("Lucky you!")

The program based on the information is given below.

What's the program about?

def main():

   pet = input("What kind of pet do you have? ").lower()

   if pet == "cat":

       print("Too bad...")

   elif pet == "dog":

       print("Lucky you!")

   elif pet == "iguana":

       print("That's interesting!")

   elif pet == "pig":

       print("Oink oink!")

   elif pet == "rabbit":

       print("Hop hop!")

   else:

       print("I'm not familiar with that pet.")

if __name__ == "__main__":

   main()

Learn more about program

https://brainly.com/question/26642771

#SPJ2

What is an electrical conductor? Name five electrical conductors

Answers

Answer:

Explanation:

silver.

copper.

gold.

Steel

Seawater.

Explanation:

Electrical conductors are those which allows the electrons to flow easily. Examples of five conductors are :-

Gold Silver CopperAluminium Iron.

Open-ended games give players the most freedom to explore other worlds.

A.
True
B.
False

Answers

A - trueeeeeeeeeeeeee

When the logging and managing information flow between management hosts and the managed devices travels on a dedicated management network, this is considered what?

Answers

What must be considered is the number of IPs that are allowed to access the management network.

We can arrive at this answer because:

During the management of information flow, it is necessary to guarantee the security of the system, preventing intruders from attacking.This can be done by restricting authorized IPs to access the management interface.This type of security measure is often neglected in systems that use a dedicated management network, as this type of network can only be accessed by a single device in the same VLAN.

However, the IPs restriction must be considered even in this system, as there are software that can provoke invasions that cause the leak of shared information.

You can find more information about software here:

https://brainly.com/question/24032221

how to connect apple pencil 2 to ipad 8th generation?

Answers

Answer:

That pencil doesn't adjust to that ipad because those two aren't compatible

Explanation:

Physical components of a computer system such as a keyboard, mouse, or modem.

Question 25 options:


Software


Network


Browser


Hardware

Answers

Answer:

D

Explanation:

D: Hardware. These are the things like mouse or Modem that you can touch physically.

Software is what the computer runs to make itself useful.

Network is the connection (either virtual or physical) that connects computers together.

Browser is a software program used to navigate the internet

is a virtue by which you need to secure information by limiting computer access to authorized personnel only.

Answers

Answer:

ummmmmmmmm

Explanation:

Confidentiality is a virtue which states that you need to secure information by limiting computer access to authorized personnel only.

Keeping confidential data is crucial especially if your business deals with very important information about a person and his security.

Trust is built between a company and a client. The client trusts the company to keep his information secure and confidential from outside parties. Once the confidentiality of the company is compromised, the business will suffer because clients will no longer trust the company to keep their data secure.

The voltage/potential difference in a circuit is 12 volts, calculate the current that is flowing through the circuit if the resistance is 48 Ohms.

Answers

Current (I) = 0.25 ampere (A)

Power (P) = 3 watt (W)

Current (I) = 0.25 ampere (A) Power (P) = 3 watt (W) Steps: I = V R = 12 volt 48 ohm =  0.25 ampere (A) P = V2 R = (12 volt)2 48 ohm =  3 watt (W)

Other Questions
write the tangent of T as a fraction Parkinson Company (PC) had a beginning balance of $86,000 and an ending balance of $90,000 in itslong-term marketable securities account. During the period the Company paid $10,000 to purchase marketable securities. If the Company reported a gain on the sale of marketable securities of $1,000 the amount of the cash inflow from the sale of securities isA. $7,000.B. $6,000.C. $5,000.D. None of the answers is correct. What is the atomic mass of the element in period 2 group 13. [tex]dx x-2secx[/tex] what is the slope of the line? 23x25 = please help How does the description of the Wingfields' apartment affect the play? It introduces some of the features that will be important later in the play. It provides a contrast between Amanda's early life in Blue Mountain with her life in the city. It provides background information about city dwellers at the end of World War I It shows that the the Wingfield family is not well off and live in a poor part of a city. then Which vocabulary word includes newspapers, magazines, the internet, radio, and television? Connotation refers to a meaning that is implied by a word. Connotations are often decided by cultural and emotional meanings. If someone called you childish, would it be considered a negative or positive connotation? 1. 2h3(3h)+ _=5h8Make equation have infinite solution2. k+_(k+1)=2kmake equation have no solution Give the number and type of solutions of the equation. write a letter to your friend describing our corona virus say to your friends If you believed a law was unjust, what do you think is the appropriate way to deal with it? A mosquito flies at a speed of 40.2 meters per minute. At this rate, how many meters can it fly in 5 minutes?PLZ HELP Need help NOW on HS geometry The comeback by Elizabeth van. Steenwyk Determine if the two triangle are congruent. If they are state how you know **WILL GIVE BRAINLIEST IF ANSWERED RIGHT** (this is not math but i just put it as math)Choose all the answers that apply.Which are benefits of cardiovascular exercise?decreases the resting heart ratehelps the blood vessels dilate more easilydecreases the stroke volumeweakens the muscles surrounding the lungsmakes the lungs able to fill more completely How to Handle BullyingYou're walking to class when you see a classmate toss all of your friend's books and things down the stairs. What could you do to handle the situation? Types of IronyIdentifying Irony Directions: Read the following examples of irony. Determine which of the three types of irony are being used and then explain your answer. Dramatic irony - This occurs when the reader or audience understands more about the events of a story than a character. Situational irony - This occurs when what actually happens is the opposite of what is expected or appropriate. Verbal irony - A person or character says one thing but really means the opposite. 1. When Mr. Goodenwell saw his baby boy Vince for the first time, he swore that he'd do anything to protect the little guy. This was easy at first, when all Vince did was lie in a pillow and drink milk. But as little Vince grew bigger, he started walking. And once he started walking, he got into everything. He was becoming a serious threat to himself when Mr. Goodenwell, making good on his vow to protect his son, went to the store and bought $150 worth of equipment to childproof his home. He put covers on the outlets, bumpers on the table corners, and a sliding lock on the toilet lid. But right as Mr. Goodenwell was adjusting the covers on the door knobs, Vince pulled the cap off an outlet and choked on it. Mr. Goodenwell found him just in time. Which type of irony is used? Explain your answer: