NEED HELP ON C HOMEWORK
Introduction: Programmers for a Better Tomorrow
Programmers for a Better Tomorrow is an organization dedicated to helping charities, medical
societies, and scholarship organizations manage various tasks so that they can focus on making
the world a better place! They have asked you and your classmates to help them develop some
new programs to benefit their organizations.
Problem: Food Bank Management (foodbank.c)
Programmers for a Better Tomorrow is now in partnership with a local Food Bank which
distributes food items to people in need. People come in to a Food Bank and make their
donations, and others might come in to make a request for any food item they want.
A Food Bank Management Program is used to keep track of the stock the Food Bank has (i.e.,
the donations), keep a record of requests that come in, fulfilling requests and printing the status
report which consists of the amount of stock present in the food bank and the requests that are
not yet fulfilled.
The program will require you to make at least one array. You may choose to make multiple one-
dimensional arrays: one to serve as a Donations Table and one to serve as a Request Table. The
index of the array will represent the inventory type. The value in the array will represent the
amount present or needed of that type.
You may, instead, choose to combine these to two arrays into a single two-dimensional array.
There are 5 inventory types:
Protein
Dairy
Grains
Vegetables
Fruits
Your program should allow the user the following options:
Enter a Donation
Enter a Request
Fulfill Requests
Print status report
Exit
Option 1:
Ask the user for the inventory type and amount of the donation to be made. When the donation
has been added to the donations table, the program should notify the user by printing out
“Donation Added”.
Option 2:
Ask the user for the inventory type and amount of the request to be made. When the request has
been added to the requests table, the program should notify the user by printing out “Request
Added”.
Option 3:
Check each type of inventory in the Request Table.
For each item that has a value in the request table, check to see if there is inventory of the same
type in the donations table.
If there are no donations of that type, print “ requests cannot be fulfilled.” Replace with the
correct inventory type (Dairy, Fruit, etc.).
If there is some inventory in the donations table, but not enough to process all requests, print “
requests will be partially fulfilled”. Reduce both the donation and request amounts based on how
much of the request was able to be fulfilled. Replace with the correct inventory type (Dairy,
Fruit, etc.).
If there is enough inventory to fulfill the request, print “type x> requests will be fulfilled.”
Reduce the appropriate amount from the Donations Table and remove the amount from the
Request Table. Replace with the correct inventory type (Dairy, Fruit, etc.).
Option 4:
Print both tables, indicating which is for donations a.
Introduction Programmers for a Better TomorrowProgrammers for a B.pdfarshin9
Introduction: Programmers for a Better Tomorrow
Programmers for a Better Tomorrow is an organization dedicated to helping charities, medical
societies, and scholarship organizations manage various tasks so that they can focus on making
the world a better place! They have asked you and your classmates to help them develop some
new programs to benefit their organizations.
Problem: Food Bank Management (foodbank.c)
Programmers for a Better Tomorrow is now in partnership with a local Food Bank which
distributes food items to people in need. People come in to a Food Bank and make their
donations, and others might come in to make a request for any food item they want.
A Food Bank Management Program is used to keep track of the stock the Food Bank has (i.e.,
the donations), keep a record of requests that come in, fulfilling requests and printing the status
report which consists of the amount of stock present in the food bank and the requests that are
not yet fulfilled.
The program will require you to make at least one array. You may choose to make multiple one-
dimensional arrays: one to serve as a Donations Table and one to serve as a Request Table. The
index of the array will represent the inventory type. The value in the array will represent the
amount present or needed of that type.
You may, instead, choose to combine these to two arrays into a single two-dimensional array.
There are 5 inventory types:
Protein
Dairy
Grains
Vegetables
Fruits
Your program should allow the user the following options:
Enter a Donation
Enter a Request
Fulfill Requests
Print status report
Exit
Option 1:
Ask the user for the inventory type and amount of the donation to be made. When the donation
has been added to the donations table, the program should notify the user by printing out
“Donation Added”.
Option 2:
Ask the user for the inventory type and amount of the request to be made. When the request has
been added to the requests table, the program should notify the user by printing out “Request
Added”.
Option 3:
Check each type of inventory in the Request Table.
For each item that has a value in the request table, check to see if there is inventory of the same
type in the donations table.
If there are no donations of that type, print “ requests cannot be fulfilled.” Replace with the
correct inventory type (Dairy, Fruit, etc.).
If there is some inventory in the donations table, but not enough to process all requests, print “
requests will be partially fulfilled”. Reduce both the donation and request amounts based on how
much of the request was able to be fulfilled. Replace with the correct inventory type (Dairy,
Fruit, etc.).
If there is enough inventory to fulfill the request, print “type x> requests will be fulfilled.”
Reduce the appropriate amount from the Donations Table and remove the amount from the
Request Table. Replace with the correct inventory type (Dairy, Fruit, etc.).
Option 4:
Print both tables, indicating which is for donations and which is for requests.
Our application aims to bring about transparency, clarity and swiftness in the process of donation thus aiming to mitigate prevailing issues in whatever zone it is possible for us to do so. This is a project report for the same.
Introduction Programmers for a Better TomorrowProgrammers for a B.pdfarshin9
Introduction: Programmers for a Better Tomorrow
Programmers for a Better Tomorrow is an organization dedicated to helping charities, medical
societies, and scholarship organizations manage various tasks so that they can focus on making
the world a better place! They have asked you and your classmates to help them develop some
new programs to benefit their organizations.
Problem: Food Bank Management (foodbank.c)
Programmers for a Better Tomorrow is now in partnership with a local Food Bank which
distributes food items to people in need. People come in to a Food Bank and make their
donations, and others might come in to make a request for any food item they want.
A Food Bank Management Program is used to keep track of the stock the Food Bank has (i.e.,
the donations), keep a record of requests that come in, fulfilling requests and printing the status
report which consists of the amount of stock present in the food bank and the requests that are
not yet fulfilled.
The program will require you to make at least one array. You may choose to make multiple one-
dimensional arrays: one to serve as a Donations Table and one to serve as a Request Table. The
index of the array will represent the inventory type. The value in the array will represent the
amount present or needed of that type.
You may, instead, choose to combine these to two arrays into a single two-dimensional array.
There are 5 inventory types:
Protein
Dairy
Grains
Vegetables
Fruits
Your program should allow the user the following options:
Enter a Donation
Enter a Request
Fulfill Requests
Print status report
Exit
Option 1:
Ask the user for the inventory type and amount of the donation to be made. When the donation
has been added to the donations table, the program should notify the user by printing out
“Donation Added”.
Option 2:
Ask the user for the inventory type and amount of the request to be made. When the request has
been added to the requests table, the program should notify the user by printing out “Request
Added”.
Option 3:
Check each type of inventory in the Request Table.
For each item that has a value in the request table, check to see if there is inventory of the same
type in the donations table.
If there are no donations of that type, print “ requests cannot be fulfilled.” Replace with the
correct inventory type (Dairy, Fruit, etc.).
If there is some inventory in the donations table, but not enough to process all requests, print “
requests will be partially fulfilled”. Reduce both the donation and request amounts based on how
much of the request was able to be fulfilled. Replace with the correct inventory type (Dairy,
Fruit, etc.).
If there is enough inventory to fulfill the request, print “type x> requests will be fulfilled.”
Reduce the appropriate amount from the Donations Table and remove the amount from the
Request Table. Replace with the correct inventory type (Dairy, Fruit, etc.).
Option 4:
Print both tables, indicating which is for donations and which is for requests.
Our application aims to bring about transparency, clarity and swiftness in the process of donation thus aiming to mitigate prevailing issues in whatever zone it is possible for us to do so. This is a project report for the same.
Our main focus is on providing an explicit experience for the guests at various restaurants. Make their lunch/dinner special every time they visit their favorite restaurant!
This presentation is a consolidation to our survey regarding the questions on the requirement and benefits of a restaurant based application.
Our main focus is on providing an explicit experience for the guests at various restaurants. Make their lunch/dinner special every time they visit their favorite restaurant!
Our main focus is on providing an explicit experience for the guests at various restaurants. Make their lunch/dinner special every time they visit their favorite restaurant!
On My Own is a comprehensive financial program for youth that is typically guided through in-person simulations. This is an online-only version created to meet the need of virtual learning in 2020.
Demographic Assessment ProjectNURS 4404 Community Health .docxsimonithomas47935
Demographic Assessment Project
NURS 4404: Community Health NursingCourse Objectives
1. Design the nursing process to promote health with community partners across the life span in community settings with both predictable and unpredictable circumstances.
2. Create partnerships with communities in the customized therapeutic care process to protect, promote, and restore optimal community health.
3. Analyze practice decisions within the community utilizing critical thinking.
4. Evaluate strategies to improve community health through scholarship.
5. 8. Develop and exhibit self-directed behaviors in the community health setting.
6. 9. Demonstrate behaviors that are professional in nature in accordance with the American Nurses Association and the Texas Board of Nursing (Essential VIII) Experiential Learning Practice Objectives:
1. Demonstrate cultural sensitivity when formulating customized therapeutic nursing care with the community.
5. Demonstrate leadership, initiative and professionalism in the community health setting and demonstrate accountability for behavior.
6. Seek appropriate assistance and utilize guidance to facilitate own learning.
7. Demonstrate behaviors that are professional in nature in accordance with the American Nurses Association and the Texas Board of Nursing (Essential VIII)Assignment Goal:
The students will be able to analyze critical data to identify health threats and risks in their assigned community.Assignment Objectives:
1. The student will locate demographic data and vital statistics that relate to the assigned community.
2. The student will summarize the collected data
3. The student will identify 2 strengths and weaknesses of the community based on the summary
4. The students will formulate a nursing diagnosis based upon the analysis of the data.
Demographic Assessment Project Overview
This assignment utilizes data mining, a tool of nursing informatics, to locate critical information about your community. The US Census, performed by law stated in The US Constitution, is collected every ten years. The results of the census are found here. The information gleaned here is immensely valuable in assessing and planning interventions for a community. This is a routine practice for public health nurses and community nurses.
It is important to understand that the date from the US Census is self- reported. It may or may not be accurate. You may notice that the percentages do not always add up to 100 percent (or they add up to more than 100 percent). Sometimes people fill the census forms out a little differently than instructed, which gives interesting results! Report the numbers as they are stated in the Census documents and relax.
The assignment is another piece of an actual community assessment. The assignment will teach you how to discover facts about the population you serve whatever practice specialty you choose. When the public health nurse completes the community assessment, the nurse engages with many partners at th.
Watch the webinar here! https://learn.extension.org/events/1037
Want to learn about federal programs that can help you build community food systems projects? Are you seeking basic grant-writing advice so you can apply competitively for grants and other federal funding to support your work? Learn the basics of finding and applying for grants.
Our application aims to bring about transparency, clarity and swiftness in the process of donation thus aiming to mitigate prevailing issues in whatever zone it is possible for us to do so. This is a project report for the same.
Your clinic needs are answered with this web-based, turnkey solution that is as effective as it is user-friendly. The ClinicPro Online will help doctors and healthcare professionals:
- Have more mobility in accessing clinic records anytime, anywhere
- Efficiently manage flow of and documents in the clinic
- Organize and speed up access to patient information
- Produce great-looking prescriptions, reports and other documents.
CenTable - Requirements Specification CenTable is a system for creati.pdfomarionmatzmcwill497
CenTable - Requirements Specification CenTable is a system for creating tabular reports from
county-level U.S.Census Data it is appropriate for batch processing (both off Ine and in support
of an on-line system). The inputs to the system are the ASCII county data fle (land associated
data dictionary) and an ASCI tle that describes the tabular report to be created. The output is a
table in either HTMI or AScll text format 1. Command-Line Parameters 1.1. The first command
line parameter must be the mame of the county level data file to use. 1.2 The second parameter
must be either-h (to indicate that the output should be in HTMor (to indicate that the output
should be in ASCl et) Location of \"Files\" .1. All census data fles must be in the same directory
as the executable 2.2 The report desoription fle must be read from standard in. 2· 3 Report
Description File 1. The format of the report deicription file has not been specified 32. Contents
of the Report Description File 3.2.1it must include a list of all of the counbies to include in the
report 22.It musz contain the field identifiers for the columns so inclade in the report [in ender.
3.23Jt mast contain #tte for each field in the report. 3.2.3.1 It must contain a format descriptor for
the title that idudt the horizonal positioning of the titie (left, center, or right) and the appropriane
way to handle ttles that are too long truncate, break word boundareia 324Jt must contain a format
descrigtor for each field in the report that includes the width of the field, the number of digts to
the right of the decimal place (for floating-point fields the padding character to use, and an
indication of whether or not the sign should always 12 5Jt must contain a specifier for each field
Chatt indicates what information (total, mean nothingl should be diplayed in the last now of the
output 1 42 Output must When the containing the required information 42.1. The tedt must be
displayed in a xed-width font 4.22. The output need not handle page breaks ie, the repert can
have an arbitrary mumber of be sent to standard out witch is used, the output must be an
appropriately formatted HTML table rows when the fiag t.ned, the output munt be an
approprately formatted ASCII tnt file ethat wil look coreect when displayed in a feed with fo
4.3.1 The output need not handle page breaks e, the report can have an arbibrary number of rows.
S1 The report desoription fle may be generated by an untrusted source. 52 Command-line
parameters may be provided by an untrusted source 5.3. CenTable must only be able to read 0m
the dinectory is installed in and standard in, Centable must only be able to write to standa out.
Solution
Okay So basically what you have to create a C Program for an application. This should be called
CenTable.
Input:
1. This system will take as input a text file which contains information about countries and their
census. It must be containing a lot of fields. You need to once take a look at the file to
unders.
Are silenced genes associated with high or low levels of DNA methyla.pdfomarionmatzmcwill497
Are silenced genes associated with high or low levels of DNA methylation?
Solution
1.Genes are silenced by methylation(adding methyl groups). Gene silencing is the process of
turning off genes,so that it will not produce proteins through translation process.
2. Gene silencing is done by adding methyl groups to the genes. So that gene is inactive.
So we conclude that silenced genes associated with high methylation. Because when gene is
methylated only then silencing of gene occurs..
More Related Content
Similar to NEED HELP ON C HOMEWORKIntroduction Programmers for a Better Tomo.pdf
Our main focus is on providing an explicit experience for the guests at various restaurants. Make their lunch/dinner special every time they visit their favorite restaurant!
This presentation is a consolidation to our survey regarding the questions on the requirement and benefits of a restaurant based application.
Our main focus is on providing an explicit experience for the guests at various restaurants. Make their lunch/dinner special every time they visit their favorite restaurant!
Our main focus is on providing an explicit experience for the guests at various restaurants. Make their lunch/dinner special every time they visit their favorite restaurant!
On My Own is a comprehensive financial program for youth that is typically guided through in-person simulations. This is an online-only version created to meet the need of virtual learning in 2020.
Demographic Assessment ProjectNURS 4404 Community Health .docxsimonithomas47935
Demographic Assessment Project
NURS 4404: Community Health NursingCourse Objectives
1. Design the nursing process to promote health with community partners across the life span in community settings with both predictable and unpredictable circumstances.
2. Create partnerships with communities in the customized therapeutic care process to protect, promote, and restore optimal community health.
3. Analyze practice decisions within the community utilizing critical thinking.
4. Evaluate strategies to improve community health through scholarship.
5. 8. Develop and exhibit self-directed behaviors in the community health setting.
6. 9. Demonstrate behaviors that are professional in nature in accordance with the American Nurses Association and the Texas Board of Nursing (Essential VIII) Experiential Learning Practice Objectives:
1. Demonstrate cultural sensitivity when formulating customized therapeutic nursing care with the community.
5. Demonstrate leadership, initiative and professionalism in the community health setting and demonstrate accountability for behavior.
6. Seek appropriate assistance and utilize guidance to facilitate own learning.
7. Demonstrate behaviors that are professional in nature in accordance with the American Nurses Association and the Texas Board of Nursing (Essential VIII)Assignment Goal:
The students will be able to analyze critical data to identify health threats and risks in their assigned community.Assignment Objectives:
1. The student will locate demographic data and vital statistics that relate to the assigned community.
2. The student will summarize the collected data
3. The student will identify 2 strengths and weaknesses of the community based on the summary
4. The students will formulate a nursing diagnosis based upon the analysis of the data.
Demographic Assessment Project Overview
This assignment utilizes data mining, a tool of nursing informatics, to locate critical information about your community. The US Census, performed by law stated in The US Constitution, is collected every ten years. The results of the census are found here. The information gleaned here is immensely valuable in assessing and planning interventions for a community. This is a routine practice for public health nurses and community nurses.
It is important to understand that the date from the US Census is self- reported. It may or may not be accurate. You may notice that the percentages do not always add up to 100 percent (or they add up to more than 100 percent). Sometimes people fill the census forms out a little differently than instructed, which gives interesting results! Report the numbers as they are stated in the Census documents and relax.
The assignment is another piece of an actual community assessment. The assignment will teach you how to discover facts about the population you serve whatever practice specialty you choose. When the public health nurse completes the community assessment, the nurse engages with many partners at th.
Watch the webinar here! https://learn.extension.org/events/1037
Want to learn about federal programs that can help you build community food systems projects? Are you seeking basic grant-writing advice so you can apply competitively for grants and other federal funding to support your work? Learn the basics of finding and applying for grants.
Our application aims to bring about transparency, clarity and swiftness in the process of donation thus aiming to mitigate prevailing issues in whatever zone it is possible for us to do so. This is a project report for the same.
Your clinic needs are answered with this web-based, turnkey solution that is as effective as it is user-friendly. The ClinicPro Online will help doctors and healthcare professionals:
- Have more mobility in accessing clinic records anytime, anywhere
- Efficiently manage flow of and documents in the clinic
- Organize and speed up access to patient information
- Produce great-looking prescriptions, reports and other documents.
CenTable - Requirements Specification CenTable is a system for creati.pdfomarionmatzmcwill497
CenTable - Requirements Specification CenTable is a system for creating tabular reports from
county-level U.S.Census Data it is appropriate for batch processing (both off Ine and in support
of an on-line system). The inputs to the system are the ASCII county data fle (land associated
data dictionary) and an ASCI tle that describes the tabular report to be created. The output is a
table in either HTMI or AScll text format 1. Command-Line Parameters 1.1. The first command
line parameter must be the mame of the county level data file to use. 1.2 The second parameter
must be either-h (to indicate that the output should be in HTMor (to indicate that the output
should be in ASCl et) Location of \"Files\" .1. All census data fles must be in the same directory
as the executable 2.2 The report desoription fle must be read from standard in. 2· 3 Report
Description File 1. The format of the report deicription file has not been specified 32. Contents
of the Report Description File 3.2.1it must include a list of all of the counbies to include in the
report 22.It musz contain the field identifiers for the columns so inclade in the report [in ender.
3.23Jt mast contain #tte for each field in the report. 3.2.3.1 It must contain a format descriptor for
the title that idudt the horizonal positioning of the titie (left, center, or right) and the appropriane
way to handle ttles that are too long truncate, break word boundareia 324Jt must contain a format
descrigtor for each field in the report that includes the width of the field, the number of digts to
the right of the decimal place (for floating-point fields the padding character to use, and an
indication of whether or not the sign should always 12 5Jt must contain a specifier for each field
Chatt indicates what information (total, mean nothingl should be diplayed in the last now of the
output 1 42 Output must When the containing the required information 42.1. The tedt must be
displayed in a xed-width font 4.22. The output need not handle page breaks ie, the repert can
have an arbitrary mumber of be sent to standard out witch is used, the output must be an
appropriately formatted HTML table rows when the fiag t.ned, the output munt be an
approprately formatted ASCII tnt file ethat wil look coreect when displayed in a feed with fo
4.3.1 The output need not handle page breaks e, the report can have an arbibrary number of rows.
S1 The report desoription fle may be generated by an untrusted source. 52 Command-line
parameters may be provided by an untrusted source 5.3. CenTable must only be able to read 0m
the dinectory is installed in and standard in, Centable must only be able to write to standa out.
Solution
Okay So basically what you have to create a C Program for an application. This should be called
CenTable.
Input:
1. This system will take as input a text file which contains information about countries and their
census. It must be containing a lot of fields. You need to once take a look at the file to
unders.
Are silenced genes associated with high or low levels of DNA methyla.pdfomarionmatzmcwill497
Are silenced genes associated with high or low levels of DNA methylation?
Solution
1.Genes are silenced by methylation(adding methyl groups). Gene silencing is the process of
turning off genes,so that it will not produce proteins through translation process.
2. Gene silencing is done by adding methyl groups to the genes. So that gene is inactive.
So we conclude that silenced genes associated with high methylation. Because when gene is
methylated only then silencing of gene occurs..
A south facing window is 2.1 m high and 4.2 m long. A horizontal diff.pdfomarionmatzmcwill497
A south facing window is 2.1 m high and 4.2 m long. A horizontal diffuse reflector is places in
front of the window and hinged at the bottom edge of the window. Radiation data for an hour are
I = 1.61 MJ/m^2, I_d = 0.33 MJ/m^2, I_b = 1.28 MJ/m^2 and R_b = 2.31. If the (diffuse)
reflectance of the reflector is 0.85, what will be the total irradiation per unit area on the window?
Solution
we know that total radiation=incident radiation=beamed radiation.
Write an extended summary (They say”) of Sheryl Sandbergs Lean.pdfomarionmatzmcwill497
Write an extended summary (\"They say”) of Sheryl Sandberg\'s \"Lean In: What Would You Do
If You Weren\'t Afraid.\" In your last paragraph, make a claim about Sandberg\'s essay(\"I
Say\"). Use this template to frame the \"I Say\" paragraph:
My own experience yields a point that is similar/different/both similar and different. (INSERT
A BRIEF PERSONAL STORY HERE THAT IS RELEVANT. YOUR STORY CAN BE
BASED ON YOUR WORK EXPERIENCE, YOUR SCHOOL EXPERIENCE, OR AN
EXPERIENCE YOU HAVE HEARD ABOUT. You can use other evidence, but I want you to
focus on the summary here, so there is no need to invest tons of time researching and reading.
) What I take away from my own experience/this example/this research is.....
Solution
Although this question is also not related with Economics.
But I would like to share my real experience here-I had only one brother ( we are 4 sisters and 1
brother ) .He was very pempared from the childhood. My father was a doctor ,he loved his five
kids equally, but my mother and two elder sisters always pampered him.He could not get proper
education even after his marrige he was not able to take proper decisions.But he was very good
and loveble persone. He loved me very much .In 2013 Feb-Doctore declared that he was in the
last stage of cencer.Although he was feeling some problem last six months but he ignored
them.He never told me about his problems.He always pretented that he was very happy and
healthy.But when he was not able to tolerate he told me and showed me all reports.that time he
was weeping bitterly .I took him in many hospitals but was not able to save his life.It was the
greatest lose of life..
Write a program that will prompt a user to input their name(first .pdfomarionmatzmcwill497
Write a program that will prompt a user to input their name
(first and last).
Ex: Please enter your first and last name: John Doe
Then, output the string.
Next, prompt the user to input their nickname.
Ex: Enter your nickname: Rowdy
Then modify the name string to consist of the person’s first name, nickname (in all caps,
enclosed in double quotes) and last name.
Then output the modified string.
Ex: John “ROWDY” Doe
NOTE: This program should loop, prompting the user to decide whether or not he or she wishes
to enter another name.
Ex: Do you wish to enter another name(y/n)?
Solution
import java.util.Scanner;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
public class MainClass {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
String name,nickname,first,last;
char choice;
do
{
System.out.println(\"Please enter your first and last name: \");
name = input.nextLine();
System.out.println(\"Your name is : \"+name);
System.out.println(\"Please enter your nickname\");
nickname = input.nextLine();
nickname = nickname.toUpperCase();
first = name.split(\" \")[0];
last = name.split(\" \")[1];
name = first + \" \\\"\" + nickname + \"\\\" \" + last;
System.out.println(\"Modified name is : \"+name);
System.out.println(\"Do you wish to enter another name(y/n)?\");
choice = input.next().toLowerCase().charAt(0);
input.nextLine();
}while(choice!=\'n\');
}
}
OUTPUT:
run:
Please enter your first and last name:
John Doe
Your name is : John Doe
Please enter your nickname
Rowdy
Modified name is : John \"ROWDY\" Doe
Do you wish to enter another name(y/n)?
y
Please enter your first and last name:
David Beckham
Your name is : David Beckham
Please enter your nickname
Becks
Modified name is : David \"BECKS\" Beckham
Do you wish to enter another name(y/n)?
n
BUILD SUCCESSFUL (total time: 18 seconds).
With a blow count of 14 the density of the soil is Select one 15e bit.pdfomarionmatzmcwill497
With a blow count of 14 the density of the soil is Select one 15e bitery dense. SC. Medium
Solution
solution-
if blow count is between 4 to 10 then the soil is loose, if blow count is between 10 to 30 then it
will be medium dense and if it is between 30 and 50 then it will be dense and greater than 50
means soil is very dense.
Here no of blow count is 14 it means soil is medium dense.Hence option c is correct.
Which process(es) can move solutes against concentration gradients (.pdfomarionmatzmcwill497
Which process(es) can move solutes against concentration gradients? (from low to high
concentration) Passive Diffusion Facilitated Diffusion Active Transport Secondary Transport
Active Transport Active and Secondary Transport Active, Secondary Transport and Facilitated
Diffusion All processes
Solution
The correct answer is Active transport.
Rest all the categories are types of diffusion. Diffusion always occurs down or along the
concentration gradient, whethrr with or without support of carrier molecule.
Transport which occurs against the concentration gradient, uses ATP and is ACTIVE
TRANSPORT..
What role do piRNAs play Serve as atemplate for transposon silencin.pdfomarionmatzmcwill497
What role do piRNAs play? Serve as atemplate for transposon silencing. Serve as a guide to
mRNA degradation enzymes. Structural component of some ribozymes. Antisense RNA
involved in RNA processing. Silences the second X chromosome in human females.
Solution
(20) a. serve as a template for transposon silencing.
The majority of piRNAs are antisense to transposon sequences, suggesting that they serve as
templates to silence transposons.
what was the PRIMARY cause of the current Greece Crisis Excessive g.pdfomarionmatzmcwill497
what was the PRIMARY cause of the current Greece Crisis? Excessive government spending,
lack o
Solution
The Greek economic crisis is the result of multiple reasons, like slow down of GDP growth rate,
higher government deficit and government debt. But the primary reason is excessive government
spending that was not matched by adequate tax reveneue. This resulted in highe government
(fiscal) deficit which was funded by higher borrowing. Higher government debt led to the
soverign debt crisis in Greece..
Three LR circuits are made with the same resistor but different induc.pdfomarionmatzmcwill497
Three LR circuits are made with the same resistor but different inductors. The figure shows the
current of the circuits as a function of time. Show on the time scale the approximate locations of
tau of each plot. Rank the three inductors according to the value of inductance, L.
Solution
Order:L3>L2>L1
Explanation: I=io×e^(-t/LR)
As L increases I decreases rapidly.
There are several things fundamentally wrong in this illustration. Po.pdfomarionmatzmcwill497
There are several things fundamentally wrong in this illustration. Point out two of them. Point
them out, describe why they are wrong, and what they were supposed to be. You can look up
anything (especially the lecture 12). size or shape of illustration do not apply (e.g. RNA primer
looks like only a few bases, but that is okay, or Helicase is triangular, but that is fine, too).
Solution
1: Since lagging strand is discontinuously synthesized in form of Okazaki fragments, RNA
primer serve to form primer for synthesis of each of these fragments. So, RNA primer should be
located adjacent to the DNA pol at lagging strand.
2: DNA pol alpha serve to form RNA/DNA primers for lagging strand synthesis. These primers
are then exptended by DNA pol delta. At lagging strand, only DNA pol alpha is shown..
The poor are available to do the unpleasant jobs that no one .pdfomarionmatzmcwill497
The poor are available to do the unpleasant jobs that no one else wants to do.
The poor purchase goods, such as those of poor quality, that otherwise could not be sold
Jobs are established for those people, such as social workers, who provide services to the
poor.
All of the above are true.
Conflict theorists view poverty as functional for our society.
Functionalists believe poverty could best be dealt with if the poor became politically aware
and active, organizing themselves to reduce inequality through government action.
Conflict theorists assume that since there is such enormous wealth in modern societies, no
one in these societies should go without satisfaction of their essential needs.
To resolve the poverty problem, functionalists urge elimination of the stigma and negative
definitions associated with poverty.
Problem-solving approach
Disarming
Win-lose approach
Role reversal
The conflict is defined as a win-lose situation.
Each side seeks solutions to meet only its needs.
Each side attempts to force the other side into submission.
Each side honestly and openly communicates its goals, needs, and ideas.
Stroking
Role reversal
Mediation
Disarming
Expectation
Verification
Threshold/perceptual reorientation
Appreciation
Functional aspects of poverty for affluent groups include: (Points : 2)
The poor are available to do the unpleasant jobs that no one else wants to do.
The poor purchase goods, such as those of poor quality, that otherwise could not be sold
Jobs are established for those people, such as social workers, who provide services to the
poor.
All of the above are true.The following is true about theoretical explanations of poverty:
(Points : 2)
Conflict theorists view poverty as functional for our society.
Functionalists believe poverty could best be dealt with if the poor became politically aware
and active, organizing themselves to reduce inequality through government action.
Conflict theorists assume that since there is such enormous wealth in modern societies, no
one in these societies should go without satisfaction of their essential needs.
To resolve the poverty problem, functionalists urge elimination of the stigma and negative
definitions associated with poverty.Question 16 of 25With the following conflict resolution
approach, the two sides engaged in the conflict attempt to sell their own solution without really
listening to the other side: (Points : 2)
Problem-solving approach
Disarming
Win-lose approach
Role reversal
Question 17 of 25The following is true about the problem-solving approach to resolving
conflict: (Points : 2)
The conflict is defined as a win-lose situation.
Each side seeks solutions to meet only its needs.
Each side attempts to force the other side into submission.
Each side honestly and openly communicates its goals, needs, and ideas.
Question 18 of 25In resolving conflict, the strategy of finding some truth in what the other
person (or side) is saying and then expressing “agreement” is: (Points : 2)
Str.
Suppose that 14 of people are left handed. If you pick two people a.pdfomarionmatzmcwill497
Suppose that 14% of people are left handed. If you pick two people at random, what is the
probability that
(1) they both are left handed? (round your answer to 2 decimal places)
(2) only one of them is left handed? (round your answer to 2 decimal places)
Solution
1)
P(both left handed) = 0.14*0.14 = 0.0196 [ANSWER]
********************
b)
There are two ways to do this, that is, the first one is left handed and the scond is right handed, or
the other way around.
Hence, we mutliply the product of probabilities by 2:
P(one is left handed) = 2*0.14*(1-0.14) = 0.2408 [ANSWER].
Please help me with these General Biology 1 (Bio 111) questions. You.pdfomarionmatzmcwill497
Please help me with these General Biology 1 (Bio 111) questions. Your response will be highly
appreciated.
1. Describe the following bonds (use examples): ionic bond, polar covalent bond, nonpolar
covalent bond, and hydrogen bond.
2. What are the properties of water? Describe each property being sure to include the following
terms: hydrophobic, hydrophilic, evaporation, cohesion, adhesion, capillarity, solvent, solute,
and solution.
3. What does the pH scale measure? What is the range on the scale? What values indicate acid,
indicate base and indicate neutral?
4. Describe the following bonds (use examples): ionic bond, polar covalent bond, nonpolar
covalent bond, and hydrogen bond.
5. What are the properties of water? Describe each property being sure to include the following
terms: hydrophobic, hydrophilic, evaporation, cohesion, adhesion, capillarity, solvent, solute,
and solution.
Solution
(1)
Ionic bonds result when complete transfer of valence electron(s) between atoms
Example: NaCl, KCl
Covalent bonds result when valence electrons are shared between atoms.
Polar covalent bonding is a type of chemical bond where a pair of electrons is unequally shared
between two atoms: Example: HCl,
Nonpolar covalent bonds are a type of chemical bond where two atoms share a pair of electrons
with each other. Example: CCl3, H2
A hydrogen bond is the attractive force between the hydrogen attached to an electronegative
atom of one molecule and an electronegative atom of a different molecule
Example: Hydrogen bonding occurs between electronegative oxygen of water with hydrogens of
other water molecules..
Problem 14. Your probability class has 250 undergraduate students and.pdfomarionmatzmcwill497
Problem 14. Your probability class has 250 undergraduate students and 50 graduate students.
The probability of an undergraduate (or graduate) student getting an A is 1/3 (or 1/2,
respectively). Let X be the number of students that get an A in your class. (a) Calculate E[X] by
first finding the PMF of X. (b) Calculate E[X] by viewing X as a stun of random variables,
whom, mean is easily calculated.
Solution.
Simplify each expression. Write all ansers without using negative ex.pdfomarionmatzmcwill497
Simplify each expression. Write all ansers without using negative exponents. Assume that all
variables are restricted to those numbers for which the expression is define.
(x/y3)4
-2x0
Please solve the problems and show your work, thank you. =)
Solution
(x/ y^3)^4
1st we will remove parentheses and distribute exponent
x^4/ y^12 so we got this as final answer.
Our understanding of genetic inheritance and the function of DNA i.pdfomarionmatzmcwill497
Our understanding of genetic inheritance and the function of DNA in producing the
characteristics of the individual have been developing for more than 150 years. Consider our
current state of knowledge. Link genetic characteristics to DNA structure. Explain how DNA
through the process of protein synthesis is responsible for the ultimate expression of the
characteristics in the organism. Describe how interference in protein synthesis can result in
disruption of cellular and bodily processes? How does the significance of one class of proteins,
the enzymes, relate to the importance of proper nutrition throughout life?
Our understanding of genetic inheritance and the function of DNA in producing the
characteristics of the individual have been developing for more than 150 years. Consider our
current state of knowledge. Link genetic characteristics to DNA structure. Explain how DNA
through the process of protein synthesis is responsible for the ultimate expression of the
characteristics in the organism. Describe how interference in protein synthesis can result in
disruption of cellular and bodily processes? How does the significance of one class of proteins,
the enzymes, relate to the importance of proper nutrition throughout life?
Solution
1.The gene encoding the production of protein is transcribed into the gene language required for
the next stage which is RNA. The RNA is then transcribed into protein for protection or the
function assigned. This is a simple illustration of how DNA can regulate expression of
characteristics.There are 2 parts to this process:translation and transcription.The gene for a
particular trait undergoes a process called transcription. This is a process in which the language
of the body\'s make-up is transcribed from one cell language to another (DNA to RNA) which
the body will recognize in order to carry out the next process. The next process is the translation
of the information from RNA to the actual product, which is the protein. Specific proteins play
specific roles so the body synthesizes the specific protein for the specific job at the specific time.
2.Errors in protein synthesis disrupt cellular fitness, cause disease phenotypes, and shape gene
and genome evolution.errors in protein synthesis reduce organism fitness: disruption of
translational fidelity with common antibiotics such as streptomycin and kanamycin kills bacteria;
cells with impaired translational proofreading ability display altered morphologies and suffer
severe fitness defects, as do cells with elevated rates of transcription errors in an essential gene;
defects in translational fidelity and in protein folding cause disease phenotypes in mouse
models.Synthesis and degradation of non-functional proteins may also be costly without being
obviously harmful. Ribosomal throughput dedicated to a polypeptide that will ultimately fail to
function represents an opportunity cost, particularly for fast-growing organisms. Expression of
quality control systems, .
Please Explain. Compute the worst case time complexity of the follow.pdfomarionmatzmcwill497
Please Explain. Compute the worst case time complexity of the following algorithm. for i = n to
2n do for j = i - n to n do print (i, j).
Solution
for i=n to 2n do
for j=i-n to n do
print (i, j)
Here we have two loops:
1. outer for loop: runs for i=n to 2n : n times
2. inner for loop:
for each value of i, it run :
0 to n
1 to n
2 to n
.......
.......
n-1 to n
n to n
So, T(n): n + (n-1) + (n-2)+ .......+1
= n(n+1)/2
Big-O : O(n^2).
3. Variance of exponential and uniform distributions(a) Compute Va.pdfomarionmatzmcwill497
3. Variance of exponential and uniform distributions
(a) Compute Var[Y ] when Y Exp(1) and when Y Unif(0, 1).
(b) Show that
i. if Y Unif(a, b), then X = (Y a)/(b a) Unif(0, 1), where a < b.
ii. if Y Exp(), then X = Y Exp(1) where > 0. Hint: Compute FX(x) = P(X x) = P(Y ?).
(c) Combine (a) and (b) to obtain Var[X] when X Exp() and when X Unif(a, b).
Solution.
Prove using a common notion that if P and Q are any points on a circ.pdfomarionmatzmcwill497
Prove using a common notion that if P and Q are any points on a circle with center O and radius
OA, then OP is congruent to OQ. Please provide details, explaining the steps.
Solution
any point on the circle is equidistant from the center so OP and OQ would also be equal to radius
r of the circle,so OP is congruent to OQ..
A workshop hosted by the South African Journal of Science aimed at postgraduate students and early career researchers with little or no experience in writing and publishing journal articles.
This presentation was provided by Steph Pollock of The American Psychological Association’s Journals Program, and Damita Snow, of The American Society of Civil Engineers (ASCE), for the initial session of NISO's 2024 Training Series "DEIA in the Scholarly Landscape." Session One: 'Setting Expectations: a DEIA Primer,' was held June 6, 2024.
Delivering Micro-Credentials in Technical and Vocational Education and TrainingAG2 Design
Explore how micro-credentials are transforming Technical and Vocational Education and Training (TVET) with this comprehensive slide deck. Discover what micro-credentials are, their importance in TVET, the advantages they offer, and the insights from industry experts. Additionally, learn about the top software applications available for creating and managing micro-credentials. This presentation also includes valuable resources and a discussion on the future of these specialised certifications.
For more detailed information on delivering micro-credentials in TVET, visit this https://tvettrainer.com/delivering-micro-credentials-in-tvet/
How to Add Chatter in the odoo 17 ERP ModuleCeline George
In Odoo, the chatter is like a chat tool that helps you work together on records. You can leave notes and track things, making it easier to talk with your team and partners. Inside chatter, all communication history, activity, and changes will be displayed.
Thinking of getting a dog? Be aware that breeds like Pit Bulls, Rottweilers, and German Shepherds can be loyal and dangerous. Proper training and socialization are crucial to preventing aggressive behaviors. Ensure safety by understanding their needs and always supervising interactions. Stay safe, and enjoy your furry friends!
How to Build a Module in Odoo 17 Using the Scaffold MethodCeline George
Odoo provides an option for creating a module by using a single line command. By using this command the user can make a whole structure of a module. It is very easy for a beginner to make a module. There is no need to make each file manually. This slide will show how to create a module using the scaffold method.
বাংলাদেশের অর্থনৈতিক সমীক্ষা ২০২৪ [Bangladesh Economic Review 2024 Bangla.pdf] কম্পিউটার , ট্যাব ও স্মার্ট ফোন ভার্সন সহ সম্পূর্ণ বাংলা ই-বুক বা pdf বই " সুচিপত্র ...বুকমার্ক মেনু 🔖 ও হাইপার লিংক মেনু 📝👆 যুক্ত ..
আমাদের সবার জন্য খুব খুব গুরুত্বপূর্ণ একটি বই ..বিসিএস, ব্যাংক, ইউনিভার্সিটি ভর্তি ও যে কোন প্রতিযোগিতা মূলক পরীক্ষার জন্য এর খুব ইম্পরট্যান্ট একটি বিষয় ...তাছাড়া বাংলাদেশের সাম্প্রতিক যে কোন ডাটা বা তথ্য এই বইতে পাবেন ...
তাই একজন নাগরিক হিসাবে এই তথ্য গুলো আপনার জানা প্রয়োজন ...।
বিসিএস ও ব্যাংক এর লিখিত পরীক্ষা ...+এছাড়া মাধ্যমিক ও উচ্চমাধ্যমিকের স্টুডেন্টদের জন্য অনেক কাজে আসবে ...
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
This presentation includes basic of PCOS their pathology and treatment and also Ayurveda correlation of PCOS and Ayurvedic line of treatment mentioned in classics.
Executive Directors Chat Leveraging AI for Diversity, Equity, and InclusionTechSoup
Let’s explore the intersection of technology and equity in the final session of our DEI series. Discover how AI tools, like ChatGPT, can be used to support and enhance your nonprofit's DEI initiatives. Participants will gain insights into practical AI applications and get tips for leveraging technology to advance their DEI goals.
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
NEED HELP ON C HOMEWORKIntroduction Programmers for a Better Tomo.pdf
1. NEED HELP ON C HOMEWORK
Introduction: Programmers for a Better Tomorrow
Programmers for a Better Tomorrow is an organization dedicated to helping charities, medical
societies, and scholarship organizations manage various tasks so that they can focus on making
the world a better place! They have asked you and your classmates to help them develop some
new programs to benefit their organizations.
Problem: Food Bank Management (foodbank.c)
Programmers for a Better Tomorrow is now in partnership with a local Food Bank which
distributes food items to people in need. People come in to a Food Bank and make their
donations, and others might come in to make a request for any food item they want.
A Food Bank Management Program is used to keep track of the stock the Food Bank has (i.e.,
the donations), keep a record of requests that come in, fulfilling requests and printing the status
report which consists of the amount of stock present in the food bank and the requests that are
not yet fulfilled.
The program will require you to make at least one array. You may choose to make multiple one-
dimensional arrays: one to serve as a Donations Table and one to serve as a Request Table. The
index of the array will represent the inventory type. The value in the array will represent the
amount present or needed of that type.
You may, instead, choose to combine these to two arrays into a single two-dimensional array.
There are 5 inventory types:
Protein
Dairy
Grains
Vegetables
Fruits
Your program should allow the user the following options:
Enter a Donation
Enter a Request
Fulfill Requests
Print status report
Exit
Option 1:
Ask the user for the inventory type and amount of the donation to be made. When the donation
has been added to the donations table, the program should notify the user by printing out
“Donation Added”.
2. Option 2:
Ask the user for the inventory type and amount of the request to be made. When the request has
been added to the requests table, the program should notify the user by printing out “Request
Added”.
Option 3:
Check each type of inventory in the Request Table.
For each item that has a value in the request table, check to see if there is inventory of the same
type in the donations table.
If there are no donations of that type, print “ requests cannot be fulfilled.” Replace with the
correct inventory type (Dairy, Fruit, etc.).
If there is some inventory in the donations table, but not enough to process all requests, print “
requests will be partially fulfilled”. Reduce both the donation and request amounts based on how
much of the request was able to be fulfilled. Replace with the correct inventory type (Dairy,
Fruit, etc.).
If there is enough inventory to fulfill the request, print “type x> requests will be fulfilled.”
Reduce the appropriate amount from the Donations Table and remove the amount from the
Request Table. Replace with the correct inventory type (Dairy, Fruit, etc.).
Option 4:
Print both tables, indicating which is for donations and which is for requests.
After options 1, 2, 3, and 4 prompt the user with the menu again.
Option 5:
Print “Thank you for running our system!” and then the program exits.
Do not prompt the user for any more information.
This is the code that needs to output:
Welcome to the Food Bank Management Program!
What would you like to do?
1. Enter a Donation
2. Enter a Request
3. Fulfill Requests
4. Print status report
5. Exit
1
What donation type would you like to enter?
0. Protein
1. Dairy
2. Grains
3. 3. Vegetables
4. Fruits
0
How many would you like to enter? 5
Donation Added.
What would you like to do?
1. Enter a Donation
2. Enter a Request
3. Fulfill Requests
4. Print status report
5. Exit
1
What donation type would you like to enter?
0. Protein
1. Dairy
2. Grains
3. Vegetables
4. Fruits
2
How many would you like to enter? 10
Donation Added.
What would you like to do?
1. Enter a Donation
2. Enter a Request
3. Fulfill Requests
4. Print status report
5. Exit
1
What donation type would you like to enter?
0. Protein
1. Dairy
2. Grains
3. Vegetables
4. Fruits
4
How many would you like to enter? 7
4. Donation Added.
What would you like to do?
1. Enter a Donation
2. Enter a Request
3. Fulfill Requests
4. Print status report
5. Exit
4
Protein: Donations: 5 Requests: 0
Dairy: Donations: 0 Requests: 0
Grains: Donations: 10 Requests: 0
Vegetables: Donations: 0 Requests: 0
Fruits: Donations: 7 Requests: 0
What would you like to do?
1. Enter a Donation
2. Enter a Request
3. Fulfill Requests
4. Print status report
5. Exit
1
What donation type would you like to enter?
0. Protein
1. Dairy
2. Grains
3. Vegetables
4. Fruits
0
How many would you like to enter? 3
Donation Added.
What would you like to do?
1. Enter a Donation
2. Enter a Request
3. Fulfill Requests
4. Print status report
5. Exit
2
5. What would you like to request?
0. Protein
1. Dairy
2. Grains
3. Vegetables
4. Fruits
1
How many would you like to request? 5
Request Added.
What would you like to do?
1. Enter a Donation
2. Enter a Request
3. Fulfill Requests
4. Print status report
5. Exit
2
What would you like to request?
0. Protein
1. Dairy
2. Grains
3. Vegetables
4. Fruits
2
How many would you like to request? 15
Request Added.
What would you like to do?
1. Enter a Donation
2. Enter a Request
3. Fulfill Requests
4. Print status report
5. Exit
4
Protein: Donations: 8 Requests: 0
Dairy: Donations: 0 Requests: 5
Grains: Donations: 10 Requests: 15
Vegetables: Donations: 0 Requests: 0
6. Fruits: Donations: 7 Requests: 0
What would you like to do?
1. Enter a Donation
2. Enter a Request
3. Fulfill Requests
4. Print status report
5. Exit
3
Dairy requests cannot be fulfilled.
Grain requests will be partially fulfilled.
What would you like to do?
1. Enter a Donation
2. Enter a Request
3. Fulfill Requests
4. Print status report
5. Exit
4
Protein: Donations: 8 Requests: 0
Dairy: Donations: 0 Requests: 5
Grains: Donations: 0 Requests: 5
Vegetables: Donations: 0 Requests: 0
Fruits: Donations: 7 Requests: 0
What would you like to do?
1. Enter a Donation
2. Enter a Request
3. Fulfill Requests
4. Print status report
5. Exit
6
Sorry, that was not a valid input.
What would you like to do?
1. Enter a Donation
2. Enter a Request
3. Fulfill Requests
4. Print status report
5. Exit
7. 5
Thank you for running our system!
This is the code I have so far:
#include
int main() {
int choice, i, number, type;
int temp_donations[5] = {0};
int donations[5] = {0};
int request[5] = {0};
char TYPES[5][20] = {"Protein", "Dairy", "Grains", "Vegetables", "Fruits"};
printf("Welcome to the Food Bank Management Program! ");
//Give and ask for the user's choice
printf("What would you like to do? ");
printf("t1. Enter a Donation ");
printf("t2. Enter a Request ");
printf("t3. Fulfill Request ");
printf("t4. Print status report ");
printf("t5. Exit ");
scanf("%d", &choice);
printf(" ");
//Print if choice is greater than 5 or less than 1
if(choice > 5 || choice < 1)
printf("Sorry, that was not a valid input. ");
while (choice != 5) {
switch (choice) {
case 1:
//ask user the type of food they would like to donate
printf(" What donation type would you like to enter? ");
number = 0;
for(i=0; i<5; i++){
printf("t%d. %s ",number, TYPES[i]);
number += 1;
}
//user input for food type and amount to donate
scanf("%d", &type);
printf(" How many would you like to enter? ");
8. scanf("%d", &donations[type]);
printf("Donation Added. ");
break;
case 2:
//ask user the type of food they would like to request
printf(" What would you like to request? ");
number = 0;
for(i=0; i<5; i++){
printf("t%d. %s ",number, TYPES[i]);
number += 1;
}
//user input for request and amount requested
scanf("%d", &type);
printf(" How many would you like to request? ");
scanf("%d", &request[type]);
printf("Request Added! ");
break;
case 3:
//go through foods and fulfill the requests if possible
for(i=0; i<5; i++){
if (request[i] > donations[i] && donations[i] == 0)
printf("%s requests cannot be fulfilled. ", TYPES[i]);
else if (request[i] > donations[i]){
printf("%s requests will be partially fulfilled. ", TYPES[i]);
temp_donations[i] = donations[i];
donations[i] -= donations[i];
request[i] -= temp_donations[i];
}
else {
donations[i] -= request[i];
request[i] -= request[i];
}
}
printf(" ");
break;
case 4:
9. //print table of current donations and requests
for(i=0; i<5; i++){
printf("t%-10s: Donations: %-2d Requests: %-2d ", TYPES[i], donations[i], request[i]);
}
printf(" ");
break;
}
//reask for user's choice
printf("What would you like to do? ");
printf("t1. Enter a Donation ");
printf("t2. Enter a Request ");
printf("t3. Fulfill Request ");
printf("t4. Print status report ");
printf("t5. Exit ");
scanf("%d", &choice);
printf(" ");
if(choice > 5 || choice < 1)
printf("Sorry, that was not a valid input. ");
}
printf("Thank you for running our system! ");
return 0;
}
It seems to work mostly but I cannot get the fulfill requests to properly work. It will only state
that the Dairy requests cannot be fulfilled and will not bring up the Grain Requests like in the
example. I do not understand what to program in to get it to resemble the output.
Solution
#include
int main() {
int choice, i, number, type;
int temp_donations[5] = {0};
int donations[5] = {0};
int request[5] = {0};
int temp;
char TYPES[5][20] = {"Protein", "Dairy", "Grains", "Vegetables", "Fruits"};
10. printf("Welcome to the Food Bank Management Program! ");
//Give and ask for the user's choice
printf("What would you like to do? ");
printf("t1. Enter a Donation ");
printf("t2. Enter a Request ");
printf("t3. Fulfill Request ");
printf("t4. Print status report ");
printf("t5. Exit ");
scanf("%d", &choice);
printf(" ");
//Print if choice is greater than 5 or less than 1
if(choice > 5 || choice < 1)
printf("Sorry, that was not a valid input. ");
while (choice != 5) {
switch (choice) {
case 1:
//ask user the type of food they would like to donate
printf(" What donation type would you like to enter? ");
number = 0;
for(i=0; i<5; i++){
printf("t%d. %s ",number, TYPES[i]);
number += 1;
}
//user input for food type and amount to donate
scanf("%d", &type);
printf(" How many would you like to enter? ");
scanf("%d", &temp); // you need to add it to existing donations, not replace the existing
donations
donations[type] += temp;
printf("Donation Added. ");
break;
case 2:
//ask user the type of food they would like to request
printf(" What would you like to request? ");
number = 0;
for(i=0; i<5; i++){
11. printf("t%d. %s ",number, TYPES[i]);
number += 1;
}
//user input for request and amount requested
scanf("%d", &type);
printf(" How many would you like to request? ");
scanf("%d", &temp); // you need to add it to existing requests, not replace the existing requests
request[type] += temp;
printf("Request Added! ");
break;
case 3:
//go through foods and fulfill the requests if possible
for(i=0; i<5; i++){
if (request[i] > donations[i] && donations[i] == 0)
printf("%s requests cannot be fulfilled. ", TYPES[i]);
else if (request[i] > donations[i]){
printf("%s requests will be partially fulfilled. ", TYPES[i]);
temp_donations[i] = donations[i];
donations[i] -= donations[i];
request[i] -= temp_donations[i];
}
else {
donations[i] -= request[i];
request[i] -= request[i];
}
}
printf(" ");
break;
case 4:
//print table of current donations and requests
for(i=0; i<5; i++){
printf("t%-10s: Donations: %-2d Requests: %-2d ", TYPES[i], donations[i],
request[i]);
}
printf(" ");
break;
12. }
//reask for user's choice
printf("What would you like to do? ");
printf("t1. Enter a Donation ");
printf("t2. Enter a Request ");
printf("t3. Fulfill Request ");
printf("t4. Print status report ");
printf("t5. Exit ");
scanf("%d", &choice);
printf(" ");
if(choice > 5 || choice < 1)
printf("Sorry, that was not a valid input. ");
}
printf("Thank you for running our system! ");
return 0;
}