O slideshow foi denunciado.
Seu SlideShare está sendo baixado. ×

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

Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio

Confira estes a seguir

1 de 2 Anúncio

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

Baixar para ler offline

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 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;
}
.

Anúncio
Anúncio

Mais Conteúdo rRelacionado

Mais de rtodd588 (20)

Mais recentes (20)

Anúncio

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

  1. 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; }

×