SlideShare une entreprise Scribd logo
1  sur  2
Hello can someone write this in a "C PROGRAM" I am having difficulty writing this program.
Chuckie lucky won a million dollars, which he places in an account that earns 8% a year. On the
last day of each year, Chuckie withdraws $100,000. Write a program that finds out how many
years it takes for Chuckie to empty his account.
Thanks.
Solution
#include <stdio.h>
int main(void)
{
double balance = 1.0e6;
unsigned int years = 0;
while (balance > 0.00)
{
balance = balance * 1.08;
balance = balance - 1.0e5;
years++;
}
printf(" years = %ld balance = %lf ",&years,&balance);
return 0;
}
Hello can someone write this in a --C PROGRAM-- I am having difficulty.docx

Contenu connexe

Plus de rtodd588

Graphite bonds in flat sheets with only London forces to hold the shee.docx
Graphite bonds in flat sheets with only London forces to hold the shee.docxGraphite bonds in flat sheets with only London forces to hold the shee.docx
Graphite bonds in flat sheets with only London forces to hold the shee.docxrtodd588
 
Given this information about activity 3-4- ES - 10- EF - 15- LS - 16-.docx
Given this information about activity 3-4- ES - 10- EF - 15- LS - 16-.docxGiven this information about activity 3-4- ES - 10- EF - 15- LS - 16-.docx
Given this information about activity 3-4- ES - 10- EF - 15- LS - 16-.docxrtodd588
 
Growing active lifestyle apparel segment Wholesale distribution mix De.docx
Growing active lifestyle apparel segment Wholesale distribution mix De.docxGrowing active lifestyle apparel segment Wholesale distribution mix De.docx
Growing active lifestyle apparel segment Wholesale distribution mix De.docxrtodd588
 
Group Policy is one of the most useful features of Windows Server 2008.docx
Group Policy is one of the most useful features of Windows Server 2008.docxGroup Policy is one of the most useful features of Windows Server 2008.docx
Group Policy is one of the most useful features of Windows Server 2008.docxrtodd588
 
how can I better understand how to do the reverse in factoring polynom.docx
how can I better understand how to do the reverse in factoring polynom.docxhow can I better understand how to do the reverse in factoring polynom.docx
how can I better understand how to do the reverse in factoring polynom.docxrtodd588
 
Holly inherited $10-000 of City of Atlanta bonds in February- In March.docx
Holly inherited $10-000 of City of Atlanta bonds in February- In March.docxHolly inherited $10-000 of City of Atlanta bonds in February- In March.docx
Holly inherited $10-000 of City of Atlanta bonds in February- In March.docxrtodd588
 
Hi- Please- need help- and step by step- More detail- I need to unders.docx
Hi- Please- need help- and step by step- More detail- I need to unders.docxHi- Please- need help- and step by step- More detail- I need to unders.docx
Hi- Please- need help- and step by step- More detail- I need to unders.docxrtodd588
 
hich is most solo ble ethane - ethamol2 butane ar butanal2 SolutionAlk.docx
hich is most solo ble ethane - ethamol2 butane ar butanal2 SolutionAlk.docxhich is most solo ble ethane - ethamol2 butane ar butanal2 SolutionAlk.docx
hich is most solo ble ethane - ethamol2 butane ar butanal2 SolutionAlk.docxrtodd588
 

Plus de rtodd588 (8)

Graphite bonds in flat sheets with only London forces to hold the shee.docx
Graphite bonds in flat sheets with only London forces to hold the shee.docxGraphite bonds in flat sheets with only London forces to hold the shee.docx
Graphite bonds in flat sheets with only London forces to hold the shee.docx
 
Given this information about activity 3-4- ES - 10- EF - 15- LS - 16-.docx
Given this information about activity 3-4- ES - 10- EF - 15- LS - 16-.docxGiven this information about activity 3-4- ES - 10- EF - 15- LS - 16-.docx
Given this information about activity 3-4- ES - 10- EF - 15- LS - 16-.docx
 
Growing active lifestyle apparel segment Wholesale distribution mix De.docx
Growing active lifestyle apparel segment Wholesale distribution mix De.docxGrowing active lifestyle apparel segment Wholesale distribution mix De.docx
Growing active lifestyle apparel segment Wholesale distribution mix De.docx
 
Group Policy is one of the most useful features of Windows Server 2008.docx
Group Policy is one of the most useful features of Windows Server 2008.docxGroup Policy is one of the most useful features of Windows Server 2008.docx
Group Policy is one of the most useful features of Windows Server 2008.docx
 
how can I better understand how to do the reverse in factoring polynom.docx
how can I better understand how to do the reverse in factoring polynom.docxhow can I better understand how to do the reverse in factoring polynom.docx
how can I better understand how to do the reverse in factoring polynom.docx
 
Holly inherited $10-000 of City of Atlanta bonds in February- In March.docx
Holly inherited $10-000 of City of Atlanta bonds in February- In March.docxHolly inherited $10-000 of City of Atlanta bonds in February- In March.docx
Holly inherited $10-000 of City of Atlanta bonds in February- In March.docx
 
Hi- Please- need help- and step by step- More detail- I need to unders.docx
Hi- Please- need help- and step by step- More detail- I need to unders.docxHi- Please- need help- and step by step- More detail- I need to unders.docx
Hi- Please- need help- and step by step- More detail- I need to unders.docx
 
hich is most solo ble ethane - ethamol2 butane ar butanal2 SolutionAlk.docx
hich is most solo ble ethane - ethamol2 butane ar butanal2 SolutionAlk.docxhich is most solo ble ethane - ethamol2 butane ar butanal2 SolutionAlk.docx
hich is most solo ble ethane - ethamol2 butane ar butanal2 SolutionAlk.docx
 

Dernier

The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
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
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
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
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
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
 
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
 
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
 
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
 

Dernier (20)

The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
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
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
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 ...
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
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
 
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
 
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
 
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
 

Hello can someone write this in a --C PROGRAM-- I am having difficulty.docx

  • 1. Hello can someone write this in a "C PROGRAM" I am having difficulty writing this program. Chuckie lucky won a million dollars, which he places in an account that earns 8% a year. On the last day of each year, Chuckie withdraws $100,000. Write a program that finds out how many years it takes for Chuckie to empty his account. Thanks. Solution #include <stdio.h> int main(void) { double balance = 1.0e6; unsigned int years = 0; while (balance > 0.00) { balance = balance * 1.08; balance = balance - 1.0e5; years++; } printf(" years = %ld balance = %lf ",&years,&balance); return 0; }