SlideShare une entreprise Scribd logo
1  sur  4
a) Function inputColleation to prompt the user to input the total collection for ea and stores it in
the array b) Function totalcollection to determine the total colection received by Compa retuns
the result to the main function c) Function mincollection to determine the minimum collection
received by C and returns the resuit to the main function. d) Function maxCollection to
detormine the maximum collection received by Ce and returns the result to the main function e)
A main program thal uses the above functions and displays the appropriate resut
Solution
Answer:)
struct collection
{
float value;
struct collection * next;
}*root = NULL;
void inputCollection(int count);
typedef struct collection N;
N* new(float data);
float totalCollection();
void inputCollection(int count)
{
float val = 0.0;
printf("Enter total collection for day %d", count);
scanf("%f", &val);
if (root == NULL)
{
root = new(val);
}
else
{
root->next = new(val);
}
}
N* new(float data)
{
N* temp = (N*)malloc(sizeof(N));
temp->value = data;
temp->next = NULL;
return(temp);
}
float totalCollection()
{
N* temp = root;
float total = 0.0;
while( temp != NULL)
{
total = total + tem->value;
temp = temp -> next
}
return total;
}
int main()
{
struct collection c;
int count = 1;
float total = 0.0;
while (count <= 7)
{
inputCollection(count);
count = count + 1;
}
total = totalCollection();
//similarly do for other 2 fun
printf(" Total of all collection = %.2f", total);
return 0;
}
a) Function inputColleation to prompt the user to input the total coll.docx

Contenu connexe

Similaire à a) Function inputColleation to prompt the user to input the total coll.docx

Presentation on Function in C Programming
Presentation on Function in C ProgrammingPresentation on Function in C Programming
Presentation on Function in C ProgrammingShuvongkor Barman
 
presentation_functions_1443207686_140676.ppt
presentation_functions_1443207686_140676.pptpresentation_functions_1443207686_140676.ppt
presentation_functions_1443207686_140676.pptSandipPradhan23
 
eee2-day4-structures engineering college
eee2-day4-structures engineering collegeeee2-day4-structures engineering college
eee2-day4-structures engineering college2017eee0459
 
1z0 851 exam-java standard edition 6 programmer certified professional
1z0 851 exam-java standard edition 6 programmer certified professional1z0 851 exam-java standard edition 6 programmer certified professional
1z0 851 exam-java standard edition 6 programmer certified professionalIsabella789
 
This is a C# project . I am expected to create as this image shows. .pdf
This is a C# project . I am expected to create as this image shows. .pdfThis is a C# project . I am expected to create as this image shows. .pdf
This is a C# project . I am expected to create as this image shows. .pdfindiaartz
 
1sequences and sampling. Suppose we went to sample the x-axis from X.pdf
1sequences and sampling. Suppose we went to sample the x-axis from X.pdf1sequences and sampling. Suppose we went to sample the x-axis from X.pdf
1sequences and sampling. Suppose we went to sample the x-axis from X.pdfrushabhshah600
 
chapter-6 slide.pptx
chapter-6 slide.pptxchapter-6 slide.pptx
chapter-6 slide.pptxcricketreview
 
Removal Of Recursion
Removal Of RecursionRemoval Of Recursion
Removal Of RecursionRicha Sharma
 
Create a JAVA program that performs file IO and database interaction.pdf
Create a JAVA program that performs file IO and database interaction.pdfCreate a JAVA program that performs file IO and database interaction.pdf
Create a JAVA program that performs file IO and database interaction.pdfmalavshah9013
 
Introduction to Computer and Programing - Lecture 04
Introduction to Computer and Programing - Lecture 04Introduction to Computer and Programing - Lecture 04
Introduction to Computer and Programing - Lecture 04hassaanciit
 
Laziness, trampolines, monoids and other functional amenities: this is not yo...
Laziness, trampolines, monoids and other functional amenities: this is not yo...Laziness, trampolines, monoids and other functional amenities: this is not yo...
Laziness, trampolines, monoids and other functional amenities: this is not yo...Mario Fusco
 

Similaire à a) Function inputColleation to prompt the user to input the total coll.docx (20)

Presentation on Function in C Programming
Presentation on Function in C ProgrammingPresentation on Function in C Programming
Presentation on Function in C Programming
 
presentation_functions_1443207686_140676.ppt
presentation_functions_1443207686_140676.pptpresentation_functions_1443207686_140676.ppt
presentation_functions_1443207686_140676.ppt
 
eee2-day4-structures engineering college
eee2-day4-structures engineering collegeeee2-day4-structures engineering college
eee2-day4-structures engineering college
 
1z0 851 exam-java standard edition 6 programmer certified professional
1z0 851 exam-java standard edition 6 programmer certified professional1z0 851 exam-java standard edition 6 programmer certified professional
1z0 851 exam-java standard edition 6 programmer certified professional
 
P2
P2P2
P2
 
Java and j2ee_lab-manual
Java and j2ee_lab-manualJava and j2ee_lab-manual
Java and j2ee_lab-manual
 
Arrays
ArraysArrays
Arrays
 
Final DAA_prints.pdf
Final DAA_prints.pdfFinal DAA_prints.pdf
Final DAA_prints.pdf
 
7720
77207720
7720
 
This is a C# project . I am expected to create as this image shows. .pdf
This is a C# project . I am expected to create as this image shows. .pdfThis is a C# project . I am expected to create as this image shows. .pdf
This is a C# project . I am expected to create as this image shows. .pdf
 
1sequences and sampling. Suppose we went to sample the x-axis from X.pdf
1sequences and sampling. Suppose we went to sample the x-axis from X.pdf1sequences and sampling. Suppose we went to sample the x-axis from X.pdf
1sequences and sampling. Suppose we went to sample the x-axis from X.pdf
 
Lab 1
Lab 1Lab 1
Lab 1
 
chapter-6 slide.pptx
chapter-6 slide.pptxchapter-6 slide.pptx
chapter-6 slide.pptx
 
Removal Of Recursion
Removal Of RecursionRemoval Of Recursion
Removal Of Recursion
 
Array Cont
Array ContArray Cont
Array Cont
 
Create a JAVA program that performs file IO and database interaction.pdf
Create a JAVA program that performs file IO and database interaction.pdfCreate a JAVA program that performs file IO and database interaction.pdf
Create a JAVA program that performs file IO and database interaction.pdf
 
Introduction to Computer and Programing - Lecture 04
Introduction to Computer and Programing - Lecture 04Introduction to Computer and Programing - Lecture 04
Introduction to Computer and Programing - Lecture 04
 
Laziness, trampolines, monoids and other functional amenities: this is not yo...
Laziness, trampolines, monoids and other functional amenities: this is not yo...Laziness, trampolines, monoids and other functional amenities: this is not yo...
Laziness, trampolines, monoids and other functional amenities: this is not yo...
 
39927902 c-labmanual
39927902 c-labmanual39927902 c-labmanual
39927902 c-labmanual
 
39927902 c-labmanual
39927902 c-labmanual39927902 c-labmanual
39927902 c-labmanual
 

Plus de janettjz6sfehrle

1 - how do you think Telehealth will impact and expand healthcare prac.docx
1 - how do you think Telehealth will impact and expand healthcare prac.docx1 - how do you think Telehealth will impact and expand healthcare prac.docx
1 - how do you think Telehealth will impact and expand healthcare prac.docxjanettjz6sfehrle
 
01 (10 points) Create a file called 01-py- This file will use one posi.docx
01 (10 points) Create a file called 01-py- This file will use one posi.docx01 (10 points) Create a file called 01-py- This file will use one posi.docx
01 (10 points) Create a file called 01-py- This file will use one posi.docxjanettjz6sfehrle
 
0-05) (Give three decimal places).docx
0-05) (Give three decimal places).docx0-05) (Give three decimal places).docx
0-05) (Give three decimal places).docxjanettjz6sfehrle
 
-The melanocortin 1 receptor(MC1R) has emerged as a melanoma susceptib.docx
-The melanocortin 1 receptor(MC1R) has emerged as a melanoma susceptib.docx-The melanocortin 1 receptor(MC1R) has emerged as a melanoma susceptib.docx
-The melanocortin 1 receptor(MC1R) has emerged as a melanoma susceptib.docxjanettjz6sfehrle
 
-Reuploaded since the solution I got before was not what the assignmen.docx
-Reuploaded since the solution I got before was not what the assignmen.docx-Reuploaded since the solution I got before was not what the assignmen.docx
-Reuploaded since the solution I got before was not what the assignmen.docxjanettjz6sfehrle
 
-Please give me some time to put away my laptop- We can have a convers.docx
-Please give me some time to put away my laptop- We can have a convers.docx-Please give me some time to put away my laptop- We can have a convers.docx
-Please give me some time to put away my laptop- We can have a convers.docxjanettjz6sfehrle
 
-H1-3- (inverse- py) Write a complete Python program- It should prompt.docx
-H1-3- (inverse- py) Write a complete Python program- It should prompt.docx-H1-3- (inverse- py) Write a complete Python program- It should prompt.docx
-H1-3- (inverse- py) Write a complete Python program- It should prompt.docxjanettjz6sfehrle
 
-Ferns differ from mosses in having A function of the roots is to abso.docx
-Ferns differ from mosses in having A function of the roots is to abso.docx-Ferns differ from mosses in having A function of the roots is to abso.docx
-Ferns differ from mosses in having A function of the roots is to abso.docxjanettjz6sfehrle
 
-Choose- A line that can be applied above- below or to the sides of a.docx
-Choose- A line that can be applied above- below or to the sides of a.docx-Choose- A line that can be applied above- below or to the sides of a.docx
-Choose- A line that can be applied above- below or to the sides of a.docxjanettjz6sfehrle
 
-Conley is the CEO of a major academic med- ical center in the midwest.docx
-Conley is the CEO of a major academic med- ical center in the midwest.docx-Conley is the CEO of a major academic med- ical center in the midwest.docx
-Conley is the CEO of a major academic med- ical center in the midwest.docxjanettjz6sfehrle
 
-10 Points- Description In this assignment you will translate a system.docx
-10 Points- Description In this assignment you will translate a system.docx-10 Points- Description In this assignment you will translate a system.docx
-10 Points- Description In this assignment you will translate a system.docxjanettjz6sfehrle
 
----------Evaluator-java---------------- package evaluator- import j.docx
----------Evaluator-java---------------- package evaluator-   import j.docx----------Evaluator-java---------------- package evaluator-   import j.docx
----------Evaluator-java---------------- package evaluator- import j.docxjanettjz6sfehrle
 
---During period of illness - infection can easily be spread- It is al.docx
---During period of illness - infection can easily be spread- It is al.docx---During period of illness - infection can easily be spread- It is al.docx
---During period of illness - infection can easily be spread- It is al.docxjanettjz6sfehrle
 
- Write-up (Individual) What is the EI Nio Southern Oscillation (ENSO).docx
- Write-up (Individual) What is the EI Nio Southern Oscillation (ENSO).docx- Write-up (Individual) What is the EI Nio Southern Oscillation (ENSO).docx
- Write-up (Individual) What is the EI Nio Southern Oscillation (ENSO).docxjanettjz6sfehrle
 
- yoars (Round to two decimal places as needed).docx
- yoars (Round to two decimal places as needed).docx- yoars (Round to two decimal places as needed).docx
- yoars (Round to two decimal places as needed).docxjanettjz6sfehrle
 
- This person- role- or group will be a subject matter expert who can.docx
- This person- role- or group will be a subject matter expert who can.docx- This person- role- or group will be a subject matter expert who can.docx
- This person- role- or group will be a subject matter expert who can.docxjanettjz6sfehrle
 
- Interpret the data in each of the cases using 2 different nontechnic.docx
- Interpret the data in each of the cases using 2 different nontechnic.docx- Interpret the data in each of the cases using 2 different nontechnic.docx
- Interpret the data in each of the cases using 2 different nontechnic.docxjanettjz6sfehrle
 
- Python Programming Section 01 Spring 2023 CO Write a Python program.docx
- Python Programming Section 01 Spring 2023 CO Write a Python program.docx- Python Programming Section 01 Spring 2023 CO Write a Python program.docx
- Python Programming Section 01 Spring 2023 CO Write a Python program.docxjanettjz6sfehrle
 

Plus de janettjz6sfehrle (20)

1 - how do you think Telehealth will impact and expand healthcare prac.docx
1 - how do you think Telehealth will impact and expand healthcare prac.docx1 - how do you think Telehealth will impact and expand healthcare prac.docx
1 - how do you think Telehealth will impact and expand healthcare prac.docx
 
01 (10 points) Create a file called 01-py- This file will use one posi.docx
01 (10 points) Create a file called 01-py- This file will use one posi.docx01 (10 points) Create a file called 01-py- This file will use one posi.docx
01 (10 points) Create a file called 01-py- This file will use one posi.docx
 
0-05) (Give three decimal places).docx
0-05) (Give three decimal places).docx0-05) (Give three decimal places).docx
0-05) (Give three decimal places).docx
 
-The melanocortin 1 receptor(MC1R) has emerged as a melanoma susceptib.docx
-The melanocortin 1 receptor(MC1R) has emerged as a melanoma susceptib.docx-The melanocortin 1 receptor(MC1R) has emerged as a melanoma susceptib.docx
-The melanocortin 1 receptor(MC1R) has emerged as a melanoma susceptib.docx
 
-Reuploaded since the solution I got before was not what the assignmen.docx
-Reuploaded since the solution I got before was not what the assignmen.docx-Reuploaded since the solution I got before was not what the assignmen.docx
-Reuploaded since the solution I got before was not what the assignmen.docx
 
-Please give me some time to put away my laptop- We can have a convers.docx
-Please give me some time to put away my laptop- We can have a convers.docx-Please give me some time to put away my laptop- We can have a convers.docx
-Please give me some time to put away my laptop- We can have a convers.docx
 
-H1-3- (inverse- py) Write a complete Python program- It should prompt.docx
-H1-3- (inverse- py) Write a complete Python program- It should prompt.docx-H1-3- (inverse- py) Write a complete Python program- It should prompt.docx
-H1-3- (inverse- py) Write a complete Python program- It should prompt.docx
 
-Ferns differ from mosses in having A function of the roots is to abso.docx
-Ferns differ from mosses in having A function of the roots is to abso.docx-Ferns differ from mosses in having A function of the roots is to abso.docx
-Ferns differ from mosses in having A function of the roots is to abso.docx
 
-Choose- A line that can be applied above- below or to the sides of a.docx
-Choose- A line that can be applied above- below or to the sides of a.docx-Choose- A line that can be applied above- below or to the sides of a.docx
-Choose- A line that can be applied above- below or to the sides of a.docx
 
-Conley is the CEO of a major academic med- ical center in the midwest.docx
-Conley is the CEO of a major academic med- ical center in the midwest.docx-Conley is the CEO of a major academic med- ical center in the midwest.docx
-Conley is the CEO of a major academic med- ical center in the midwest.docx
 
-51003i+2i2.docx
-51003i+2i2.docx-51003i+2i2.docx
-51003i+2i2.docx
 
-2- num_list ---.docx
-2- num_list ---.docx-2- num_list ---.docx
-2- num_list ---.docx
 
-10 Points- Description In this assignment you will translate a system.docx
-10 Points- Description In this assignment you will translate a system.docx-10 Points- Description In this assignment you will translate a system.docx
-10 Points- Description In this assignment you will translate a system.docx
 
----------Evaluator-java---------------- package evaluator- import j.docx
----------Evaluator-java---------------- package evaluator-   import j.docx----------Evaluator-java---------------- package evaluator-   import j.docx
----------Evaluator-java---------------- package evaluator- import j.docx
 
---During period of illness - infection can easily be spread- It is al.docx
---During period of illness - infection can easily be spread- It is al.docx---During period of illness - infection can easily be spread- It is al.docx
---During period of illness - infection can easily be spread- It is al.docx
 
- Write-up (Individual) What is the EI Nio Southern Oscillation (ENSO).docx
- Write-up (Individual) What is the EI Nio Southern Oscillation (ENSO).docx- Write-up (Individual) What is the EI Nio Southern Oscillation (ENSO).docx
- Write-up (Individual) What is the EI Nio Southern Oscillation (ENSO).docx
 
- yoars (Round to two decimal places as needed).docx
- yoars (Round to two decimal places as needed).docx- yoars (Round to two decimal places as needed).docx
- yoars (Round to two decimal places as needed).docx
 
- This person- role- or group will be a subject matter expert who can.docx
- This person- role- or group will be a subject matter expert who can.docx- This person- role- or group will be a subject matter expert who can.docx
- This person- role- or group will be a subject matter expert who can.docx
 
- Interpret the data in each of the cases using 2 different nontechnic.docx
- Interpret the data in each of the cases using 2 different nontechnic.docx- Interpret the data in each of the cases using 2 different nontechnic.docx
- Interpret the data in each of the cases using 2 different nontechnic.docx
 
- Python Programming Section 01 Spring 2023 CO Write a Python program.docx
- Python Programming Section 01 Spring 2023 CO Write a Python program.docx- Python Programming Section 01 Spring 2023 CO Write a Python program.docx
- Python Programming Section 01 Spring 2023 CO Write a Python program.docx
 

Dernier

Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...KokoStevan
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterMateoGardella
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 

Dernier (20)

Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 

a) Function inputColleation to prompt the user to input the total coll.docx

  • 1. a) Function inputColleation to prompt the user to input the total collection for ea and stores it in the array b) Function totalcollection to determine the total colection received by Compa retuns the result to the main function c) Function mincollection to determine the minimum collection received by C and returns the resuit to the main function. d) Function maxCollection to detormine the maximum collection received by Ce and returns the result to the main function e) A main program thal uses the above functions and displays the appropriate resut Solution Answer:) struct collection { float value; struct collection * next; }*root = NULL; void inputCollection(int count); typedef struct collection N; N* new(float data); float totalCollection(); void inputCollection(int count) { float val = 0.0; printf("Enter total collection for day %d", count);
  • 2. scanf("%f", &val); if (root == NULL) { root = new(val); } else { root->next = new(val); } } N* new(float data) { N* temp = (N*)malloc(sizeof(N)); temp->value = data; temp->next = NULL; return(temp); } float totalCollection() { N* temp = root; float total = 0.0; while( temp != NULL) {
  • 3. total = total + tem->value; temp = temp -> next } return total; } int main() { struct collection c; int count = 1; float total = 0.0; while (count <= 7) { inputCollection(count); count = count + 1; } total = totalCollection(); //similarly do for other 2 fun printf(" Total of all collection = %.2f", total); return 0; }