Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- int main(){
- double monto, principal=1000.0, tasa=.05;
- int anio;
- printf( "%4s%21s\n", "Anio", "Monto del deposito" );
- for(anio=1;anio<=10;anio++){
- monto=principal*pow(1.0+tasa, anio);
- printf("%4d%21.2f\n", anio, monto);
- }
- return 0;
- }
- // no olvidar compilar usando -l m
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement