write c program that asks the user to enter the amount that he / she has budgeted for a month. a loop should then prompt the user to enter each of his / her expenses for the month, and keep a running total. when the loop finishes, the program should display the amount that the user is over or under budget. previousnext

Answers

Answer 1

Here is the C program that asks the user to enter the amount that he/she has budgeted for a month and keeps track of the expenses entered by the user and provides the result whether he/she is over or under the budget:

#include

#include

int main(){    

int budget, expense, total = 0;    

printf("Enter the amount you have budgeted for this month: $");    

scanf("%d", &budget);    

while(1){        

printf("Enter an expense (enter 0 to quit): $");        

scanf("%d", &expense);        

if(expense == 0)  

  break;        

total += expense;    

}    

int diff = total - budget;    

if(diff >= 0)        

printf("You are under budget by $%d\n", diff);    

else        

printf("You are over budget by $%d\n", abs(diff));    

return 0;

}

The program starts by asking the user to input the budget for the month. Then, it enters an infinite loop that keeps on asking the user to input an expense. The user can quit the program by entering 0 as an expense. The program keeps a running total of the expenses entered by the user. Once the user quits the program, the program calculates the difference between the total expense and the budget. If the difference is negative, it means the user has gone over the budget, and if it is positive or zero, it means the user is under the budget.

Learn more about budget visit:

https://brainly.com/question/29704207

#SPJ11


Related Questions

Kerri uses a photo editing program a lot. To increase her productivity, she should_____.


delete it from the Start menu

put it in her My Documents folder

move the program to the desktop

create a shortcut for it on Quick Launch

Answers

Answer:

Move the program to the desktop

Explanation:

It will be easier to access and quicker to open.




The following code will not compile. Which of the options below would allow the code to
compile and run as intended?
if (x >= -10 and < 10):
print("In range")

Answers

Answer:

if (x >= -10 and x < 10):

print("In range")

Explanation:

you're missing an x in the if statement. program is getting confused when you run because it doesnt know what to compare after the and if you add x it'll know what to compare.

all this is saying is that if x is greater than or equal to -10 and x is less than 10 its in range!

if (x >= -10 and x< 10):

print("In range")

When is it better to use asymmetric key encryption and when is
it better to use symmetric key encryption? Explain why

Answers

Asymmetric key encryption is typically better suited for scenarios where secure communication and key exchange are the primary concerns. On the other hand, symmetric key encryption is more efficient and suitable for scenarios where speed and performance are crucial.

Asymmetric key encryption, also known as public-key encryption, involves the use of two different keys: a public key and a private key. The public key is widely distributed and used for encryption, while the private key is kept secret and used for decryption. This type of encryption is advantageous in situations where secure communication and key exchange are essential. For example, when two parties want to securely exchange sensitive information over an insecure network, they can use each other's public keys to encrypt and transmit data, ensuring confidentiality and integrity.
Symmetric key encryption, also known as secret-key encryption, uses a single shared key for both encryption and decryption processes. This type of encryption is faster and more efficient than asymmetric encryption because it doesn't involve complex mathematical operations. It is best suited for scenarios where speed and performance are critical, such as bulk data encryption and decryption. Symmetric encryption is commonly used for securing data at rest or encrypting large amounts of data, such as files or database records.
In summary, asymmetric key encryption is preferred when secure communication and key exchange are the primary concerns, while symmetric key encryption is more suitable for scenarios where speed and efficiency are crucial. The choice between these encryption methods depends on the specific requirements of the application, balancing security, performance, and usability factors.



learn more about asymmetric key encryption  here

https://brainly.com/question/30625217



#SPJ11

several ways that we commonly use technology today that people couldn't 10 years ago. Are these uses helpful or harmful to society overall?

Answers

Some of the technology that didn't exist 10 years ago are:

Human-Like RobotiPadsUber etc.

These technologies are not harmful. Most technologies are amoral, meaning they cannot do good or evil alone. Whether they become good or evil depends on their use.

What is technology?

Technology is the utilization of knowledge to achieve practical goals in a predictable and repeatable manner. The term technology may also refer to the outcome of such an undertaking.  Technology is widely used in medicine, research, industry, communication, transportation, and everyday life.

On the contrary side, technology has the potential to bring out our worst traits. Social media sites can give us content that enrages or depresses us, increasing (or decreasing) the likelihood that we would engage in immoral behavior based on our emotions.

These platforms can also be utilized by unscrupulous actors to facilitate the commission of immoral acts.

Learn more about technology:
https://brainly.com/question/9171028
#SPJ1

What is empowerment technology?

Answers

It the use of technological devices such mobile phones and computer devices to help retain and locate information.

PLEASE HELP!!~~~~
What is the total number of time zones that can be configured to show by default in a calendar in Outlook 2016?


1

2

3

4

Answers

Answer:

2

Explanation:

The total number of time zones that can be configured to show by default in a calendar in Outlook 2016 is 2. The correct option is b.

What are time zones?

A time zone is a region that adheres to a common standard of time for social, commercial, and legal activities. All events on the calendar are updated when you open Outlook.

Outlook uses the time zone that is set as the default when you create a new event in the calendar. When establishing an event, you have the option of choosing a different time zone.

The Calendar in the most recent iterations of Outlook for Microsoft 365 can show three different time zones. You can view two time zones in other versions of Outlook, such as Outlook 2019 Volume License, Outlook 2016, Outlook 2013, and Outlook 2010.

Therefore, the correct option is b. 2.

To learn more about Outlook 2016, refer to the link:

https://brainly.com/question/28579226

#SPJ6

Why do people choose IT ​

Answers

The Information Technology industry is one of the fastest-growing sectors worldwide providing jobs full of opportunities for professional success. The IT industry offers quick employment, opportunities in every sector, multiple career paths, high salaries, and it's easy to enter this industry without a college degree

When Visual Studio displays a new project, a blank form is shown in the __________ window.
a. Properties
b. ToolBox
c. Project
d. Designer

Answers

Answer:project

Explanation:

Tell me 2-6 computer parts that are inside a computer.

Spam answers will not be accepted.

Answers

Answer:

Memory: enables a computer to store, at least temporarily, data and programs.

Mass storage device: allows a computer to permanently retain large amounts of data. Common mass storage devices include solid state drives (SSDs) or disk drives and tape drives.

Input device: usually a keyboard and mouse, the input device is the conduit through which data and instructions enter a computer.

Output device: a display screen, printer, or other device that lets you see what the computer has accomplished.

Central processing unit (CPU): the heart of the computer, this is the component that actually executes instructions.

Explanation:

Help me. its due tonight

Help me. its due tonight

Answers

d- enjoy
b- national service !

The post-closing trial balance shows the balances of only the ____ accounts at the end of the period.
A. liability
B. asset
C. temporary
D. permanent​

Answers

Answer: The post-closing trial balance shows the balances of only the “permanent” accounts at the end of a period. So your answer is D. Permanent.

Have a nice day!

If+some+aspect+of+a+computer+accounts+for+50%+of+program+execution+time,+what+is+the+limit+on+how+many+times+faster+programs+can+run+if+engineers+focus+on+improving+that+aspect?

Answers

If some aspect of a computer accounts for 50% of program execution time, the limit on how many times faster programs can run if engineers focus on improving that aspect is 2 times faster.

This is because if the engineers were to improve that aspect by, for example, optimizing the code or upgrading the hardware, they could potentially reduce the execution time by 50%. So, if the original program took X amount of time to execute, the improved program would take X/2 amount of time, which is twice as fast.

If a specific aspect accounts for 50% of program execution time, improving that aspect by the maximum possible extent would reduce its contribution to 0%. In this scenario, the program execution time would be halved since the aspect no longer contributes to the overall time. Therefore, the program can run up to 2 times faster (twice as fast) if engineers focus on improving that specific aspect.

To learn more about how to improve execution time: https://brainly.com/question/30087670

#SPJ11

[ANSWER = BRAINLIEST] How to mark an answer as brainliest?

Answers

Answer:

once your question is answered you get an option available on the bottom of the answer

see attached

and you click on Mark as brainliest

[ANSWER = BRAINLIEST] How to mark an answer as brainliest?

Answer:

You are able mark a question Brainliest when there are 2 existing answers, or if 1 answer has existed for a while.

Hope this helps! Now get in there and mark me Brainliest! :v

LOL...s o r r y

3. How are you able to create photographs differently than 100 years ago?

Answers

Answer:

it willbe black and white

Explanation:

Answer:

Yes, of course!

Explanation:

Digital Cameras can create photographs very different than 100 years ago, which means the answer is yes.

Microservices is most closely related to what other. established acronym? A. API B. AWS C. SOA D. PaaS. ANS

Answers

Microservices is most closely related to the acronym SOA (Service-Oriented Architecture).

Microservices and Service-Oriented Architecture (SOA) share similarities in their approach to software development and design. Both concepts focus on breaking down complex systems into smaller, independent services that can be developed, deployed, and scaled independently.

Microservices architecture is a software development approach where an application is built as a collection of small, loosely coupled services.

Each service is responsible for a specific business capability and can be developed and deployed independently. This modular and decentralized approach enables flexibility, scalability, and resilience in large-scale applications.

Similarly, SOA is an architectural style that promotes the development of software applications as a composition of services.

These services are self-contained, reusable, and interoperable components that can be combined to create complex business processes. SOA emphasizes the use of standardized protocols and interfaces to enable communication and integration between different services.

While both microservices and SOA aim to enhance flexibility, maintainability, and scalability, microservices often emphasize lightweight communication protocols and decentralized governance, while SOA may involve more centralized management and standardized middleware.

Learn more about SOA

brainly.com/question/31823698

#SPJ11

what are the advantages of customer relationship managment​

Answers

Answer:

Enhances Better Customer Service.

Facilitates discovery of new customers.

Increases customer revenues.

Helps the sales team in closing deals faster.

Enhances effective cross and up-selling of products.

Simplifies the sales and marketing processes.

Makes call centers more efficient.

Enhances customer loyalty.

While working on an investigation, a colleague hands you a list of file creation and access times taken from a compromised workstation. To match the times with file access and creation times from other systems, what do you need to account for

Answers

Answer:

Record time offsets.

Explanation:

In this scenario, to match the times with file access and creation times from other systems, you will need to account for time offsets.

The time offset refers to the time stamp associated with different processes or tasks on a computer in nanoseconds through the operating system.

Since you've been handed a list of file creation and access times taken from a compromised workstation by your colleague, you'll need to match respectively the time the file was created to the time it was accessed by an unauthorized user.

Additionally, the time stamp varies depending on the operating system being used;

- For windows operating system, it uses a 64 bit time stamp.

- For Linux or Unix, it uses a 32 bit time stamp.

Which of the following statements are true regarding the properties and characteristics of TCP/IP? (Choose all that apply).
A. IP provides addressing and routing
B. IPv6 is more secure than IPv4
C. IPv6 has a 64 bit address space
D. TCP/IP was not designed with security in mind
E. 7/8th of the Internet could be destroyed and it would still function
F. TCP provides reliable delivery
G. IPv4 has a 32 bit address space

Answers

The statements that are true regarding the properties and characteristics of TCP/IP (Transmission Control Protocol/Internet Protocol) are,

A. IP provides addressing and routing
B. IPv6 is more secure than IPv4
C. IPv6 has a 64 bit address space
F. TCP provides reliable delivery


A. IP (Internet Protocol) is responsible for providing addressing and routing to packets in the network.
B. IPv6 (Internet Protocol version 6) provides better security features than IPv4, including built-in encryption and authentication.
C. IPv6 has a larger address space than IPv4, with 128 bits compared to 32 bits in IPv4.
D. TCP/IP was not designed with security in mind initially, but security features have been added over time.
E. This statement is not accurate and is not related to the properties or characteristics of TCP/IP.
F. TCP (Transmission Control Protocol) provides reliable delivery by ensuring packets are delivered in order and retransmitting any lost packets.
G. IPv4 has a 32 bit address space, which limits the number of unique addresses available and has led to the depletion of available addresses.

Learn more about Transmission Control Protocol:

https://brainly.com/question/14280351

#SPJ11

How do you reset a g.mail password?

Answers

Answer:

put: forgot password to reset it

Answer:

Change your pass word

Open your Go ogle Account. You might need to sign in.

Under "Security," select Signing in to G oo gle.

Choose Password. You might need to sign in again.

Enter your new password, then select Change Password.

What is an input and output device? Give examples.​

Answers

Answer:

input devices are a piece of equipment used to provide data to the computer examples:  mouse, keyboard, scanner, camera, etc

output devices are any piece of computer hardware equipment which converts information into a human readable form examples: printer, monitor, and others

typically, the first iteration or two of the up produces documentation and a ____ system

Answers

The first iteration or two of the up produces documentation and a prototype system. Prototyping involves the production of a partial implementation of the system.

Prototyping enables users to assess the system’s usability and verify that the requirements have been correctly interpreted. Prototyping can be utilized as part of iterative development, allowing the system to be constructed in smaller increments.Prototyping is a method for creating prototypes or models of a system, as well as a tool for developing and refining requirements and design. It is used to confirm that the software will meet user expectations and that it will function properly. A prototype is a limited model of a product or system that is created for testing and development purposes. It’s a small version of the end product that includes only the key features or functions. As a result, a prototype may be created in a variety of formats, including sketches, wireframes, mockups, or working software. A prototype can be used to evaluate a system’s functionality and usability and to gather feedback from users.

To know more about first iteration visit:

https://brainly.com/question/32215783

#SPJ11

What do microphone means

Answers

Answer:

A tiny phone

Explanation:

It means a tiny phone

Please help me... I'll give you brainliest
Assignment Guidelines
Write an essay, preferably 500 words, or more summarizing your experience of writing the “Hello world!” program (java). Answer some of the following questions, do you understand how the NotePad text editor and NetBeans work together? Did your program compile cleanly, or did it include errors? Were you able to identify and fix the errors? How many times did you need to fix and rebuild your program before it ran? Remember to spell- and grammar-check your paper and to include a title page.

Answers

Answer:

Explanation:

so u have to wirte a

Ava is at her first job interview, and the interviewer asks her a difficult question she hasn't prepared to answer. What should Ava do?

Helpppp!!!!! im giving Brainliest

Answers

Answers: It's A. Or C. sorry that the best i got

Explanation:

Answer:

Take a deep breath and gather her thoughts.

Explanation:

Just took it and got full marks

Approximately how many times should you review and practice possible fill in the blank questions that may be on a test? a. 5-10 times c. 1-3 times, to get a good feeling about what the possible answers could be b. until they can be easily answered d. 2-5 times

Answers

B. Until they can be easily answered. To understand the best possible answer, we cannot change the number of reviews. It can be resolved on the first try, but not after 100.

Because of this, response "B" is the best option for this question

How do you respond to a request for explanation?

Explaining is a skill that may be demonstrated rather easily. In order to receive marks, answers are typically divided into three parts: convey a message. State the outcome (good or unfavorable) for the business and provide a justification (commonly expressed as "because"). With a topic sentence, mention the first point of contention. Using your sources, support this topic statement with examples. Describe the proof and explain how it supports your claim. Finish each paragraph by restating your thesis and highlighting its significance. An explanation for a group of observations or a response to a scientific enquiry is referred to as a hypothesis.

To learn more about 'resolved' refer to

https://brainly.com/question/14231860

#SPJ4

adding transition slides to a presentation

Answers

Answer:

1. Select the slide you want to add a transition to.

2. Select the Transitions tab and choose a transition. Select a transition to see a preview.

3. Select Preview to see what the transition looks like.

To remove a transition, select Transitions > None.

answer john recently upgraded from windows 8.1 to windows 10, after the upgrade is complete, on the right-hand side of his desktop there is a new area that contains a way to toggle several windows features on and off, access the settings app, and view notifications. what is this area called in windows 10?

Answers

Answer:

nswer john recently upgraded from windows 8.1 to windows 10, after the upgrade is complete, on the right-hand side of his desktop there is a new area that contains a way to toggle several windows features on and off, access the settings app, and view notifications. what is this area called in windows 10?

The area in windows 10  is called the Action center

new action center which is in windows 10 you'll find app notifications and quick actions. Program alerts as well as quick actions can be contained within Window 10's new action center. Browse for the action center icon just on the taskbar.

The original action center has already been rebranded Security and Maintenance, however, it is still intact. Users still visit the site to modify their security settings. It is also s a central place wherein users can access alerts and perform actions that can ensure Windows works efficiently. This is when critical safety, as well as servicing notifications, will appear if Windows uncovers certain software or equipment problems that require user response.

learn more about Action center here: https://brainly.com/question/17827631

#SPJ4

what type of activities are performed with the help of the software used in hospitals?

Answers

Answer:

Xrays, Ultrasounds, managing patient records, communicating with colleagues, etc.

xrays ultrasounds lasers

I need help writing the algorithm I know how to do the flow chart for the first one but I’m not sure if the second question is a for loop

I need help writing the algorithm I know how to do the flow chart for the first one but Im not sure if

Answers

Answer:

The algorithm is as follows:

(a) Sales and commission

1. Start

2. Input Sales

3. Commission = 0.30 * Sales

3. If sales >= 4000.00 then

3.1   Commission = 0.60 * Sales

4. End If

5. Print Commission

6. Stop

(b) Amount of Rainfall

1. Start

2. Days = 1

3. Total = 0.0

4. While Days <= 31

4.1. Input Rainfall

4.2. Total = Total + Rainfall

4.3. Days = Days + 1

4.4. End If

5. Print Total

6. Stop

See attachment for flowchart

Explanation:

(a) Sales and commission

This begins the algorithm

1. Start

This gets sales from the user

2. Input Sales

This calculates the commission based on 30% (i.e. for sales < 4000)

3. Commission = 0.30 * Sales

This checks if sales is greater than or equal to 4000

3. If sales >= 4000.00 then

This calculates the commission as 60% of Sales

3.1   Commission = 0.60 * Sales

This ends the if condition

4. End If

This prints the calculated commission

5. Print Commission

This ends the algorithm

6. Stop

(b) Amount of Rainfall

This begins the algorithm

1. Start

This initializes the number of days to 1

2. Days = 1

This initializes total rainfall to 0

3. Total = 0.0

The following while loop is repeated until day 31st

4. While Days <= 31

This gets input for Rainfall from the user

4.1. Input Rainfall

This calculates the total rainfall

4.2. Total = Total + Rainfall

This increments the number of days

4.3. Days = Days + 1

This ends the if statement

4.4. End If

This prints the total rainfall

5. Print Total

This ends the algorithm

6. Stop

I need help writing the algorithm I know how to do the flow chart for the first one but Im not sure if

NEED ANSWERS ASAP
Which search strategy would likely retrieve the fewest results?
“country music” +2010
music OR country OR 2010
country AND music OR 2010
“country music”
music +country +2010

Answers

The second option:) said

Answer:

Its Option A for me

Explanation:

Other Questions
FILL IN THE BLANK. In a(n) _____ culture, managers are likely to lead by example, encouraging employees to take risks and experiment. you are a project manager of the nhq project in an organization and you're working with some project team members and stakeholders who are in an argument about the project work. while you've tried to help the stakeholders to resolve the differences, they are being obstinate about the work and they don't want to work with you or the project team to really resolve the difference. you've decided that you need to escalate the problem to management. which plan defines the escalation process? this type of question contains radio buttons and checkboxes for selection of options. use tab for navigation and enter or space to select the option. option a resource management plan Make an argument for legalizing the copying of music or software. a paragraph containing at least five sentencesSubject: policy legal ethical choose two of the following three questions and post your answers: 1. in your own words, what is meant by the statement that correlation does not imply causality? 2. in your own words, please describe the difference between the regression equation and the regression equation . 3. values of r: if you had computed the value of the linear correlation coefficient to be 1.200, what should you conclude? Brown v. Board of Education, Topeka removed the concept of "separate but equal" that supported racial segregation. The Supreme Court's decision would change the way states and local governments approached public education. After the decision, schools were no longer allowed to separate students on the basis of race. As a result of the decision, African American children were allowed access to their local public schools and would no longer have to travel across town to segregated schools. This Supreme Court decision helped to give the Civil Rights movement momentum by granting equal access to education for African American students How have African cultures made an impact in Latin American If the DNA of a representative species from each of the major kingdoms was examined, the sequences coding for which of following would be expected to be most similar?A. PhotosynthesisB.Colesterol synthesisC.Protein modificationD.DNA synthesis one reason that gains iq and achievement test scores from attending head start quickly dissolve is that many of the children how does blood pressure work what does fae mean? if it helps this is from the topic forces and elasticity Suppose your roommate studies 25 hours per week and they criticize you for not studying as much. You claim that most students don't study that much, and your roommate insists that this is pretty average and that you are just lazy. The two of you survey a random sample of students and find a sample mean of 20 hours with a confidence interval of (14, 26). What can be concluded regarding your roommate's claim that the average student studies for 25 hours a week:a) Your roommate is most likely incorrectb) Your roommate has been proven to be correct.c) It's possible that your roommate is correct.d) Your roommate is most likely correct. When a product is in the ________ stage, profits level off or decline because of increased marketing outlays to defend the product against competition. ________ shows the actual performance of ads in terms of awareness, costs efficiency, or sales and those that don't do well may be dropped. When a researcher wants to report the average cost of college tuition from the 1950s until present time, he or she enlists _______ statistics.a) Inferentialb) Descriptivec) Correlationald) Predictive hich of the following ways to assign employees to activities will more likely lead to a higher labor utilization? assume demand is unlimited. multiple choice each employee takes care of all activities involved in the process. each employee specializes in one activity. each employee works on the bottleneck activity while nonbottleneck activities are removed from the process. one employee works on the bottleneck activity while the others work on nonbottleneck activities. which of the following explains the development patterns for a country that has a large proportion of its economy engaged in the secondary economic sector? responses the country exhibits extremely high land values as vast acreage is needed for manufacturing plants and luxury housing developments for manufacturing executives. the country exhibits extremely high land values as vast acreage is needed for manufacturing plants and luxury housing developments for manufacturing executives. the country has an aging urban population and is importing day laborers from rural areas to keep up with the demands of production. the country has an aging urban population and is importing day laborers from rural areas to keep up with the demands of production. the country has a large population of well-educated labor, but it is widely dispersed around the country, distant from manufacturing facilities and employment opportunities. the country has a large population of well-educated labor, but it is widely dispersed around the country, distant from manufacturing facilities and employment opportunities. the country has access to shipping lanes and inexpensive transport options that lead to establishment of factories close to raw materials or to markets, depending on the manufacturing process. the country has access to shipping lanes and inexpensive transport options that lead to establishment of factories close to raw materials or to markets, depending on the manufacturing process. the country has available resources important to manufacturing, such as water and fossil fuels, but access is limited in many areas. methrotrexate a. take the medication three times a week at the same time b. report any incidence of increased fatigue and weakness c. take the medication an hour before you eat three times a week d. you should not lay down for two hours after taking the medication e. take the medication with food if you get nauseous At what price can buy a T-Bill maturing Sept 22 that pays$10,000 in 129 days? Information from a newspaper quote: Bid=0.278,Asked=0.268 Rick the receptionist claims that he types an average of 70 words per minute. In order to test this, Rick's boss gives him 15 different one minute typing challenges throughout the day. On each challenge, Rick's boss records the number of words typed. The boss calculates the sample mean to be 67 words per minute and the sample standard deviation to be 16 words per minute. He calculates a test statistic for the following hypothesis test:H0: ?\u = 70Ha: u (does not equal) 70Assuming the null hypothesis is true, this test statistic will follow:a. the t distribution with 16 degrees of freedomb. the t distribution with 14 degrees of freedomc. the t distribution with 15 degrees of freedomd. the standard normal distribution(the answer I have chosene. the t distribution with 14 degrees of freedom Danielle is saving money to buy a new computer game. She needs to save at least 45 dollars to buy thegame. She has saved 11 dollars so far. Let n represent the number of dollars she still needs to save in order to buy the game. Which number sentence best describes this situation?Answer choices: A. 11 + n 45B. 11 + n 45C. 11n 45D. 11n 45