#include<iostream>
#include<math.h>
using namespace std;
int calculate(double amount[],int year,double rate,double in[],double p[],double* m,double * t)
{
double mon,tot,mr;
int mm,k;
mm = year * ;
mr = rate / mm;
m = & mon;
t = & tot;
mon = amount[] * mr* pow(+mr,mm) / (pow(+mr,mm) - );
tot = mon * mm ;
for(k = ;k <= mm ; k++)
{
in[k] = amount[k-] * mr;
p[k] = mon-in[k];
amount[k] = amount[k-]-p[k];
}
return ;
}
int main()
{
double amount[];
int year,k,l;
double * m,* t,a,b;
double rate;
double in[],p[];
m=&a;
t=&b;
cout<<"Please input load amount,the number of years and the annual interest rate: "<<endl;
cin>>amount[]>>year>>rate;
l = year*;
calculate(amount,year,rate,in,p,m,t);
cout<<"Load Amount: "<<amount[]<<endl;
cout<<"Number of Years: "<<year<<endl;
cout<<"Annual Interest Rate: "<<rate<<endl;
cout<<"Monthly Payment: "<<a<<endl;
cout<<"Total Payment: "<<b<<endl;
cout<<"Payment# Interest Principal Balance"<<endl;
for(k=;k <= l;k++)
cout<<k<<" "<<in[k]<<" "<<p[k]<<" "<<amount[k]<<endl;
return ;
}

band的更多相关文章

  1. [模拟电路] 2、Passive Band Pass Filter

    note: Some articles are very good in http://www.electronics-tutorials.ws/,I share them in the Cnblog ...

  2. Java band [Cite]

    SampleModel  取样模型Databuffer 数据缓冲区 Raster 光栅Sample 样本band  带 SampleModel是java awt中的一个抽象类,它定义了一个接口,用于提 ...

  3. Jasper_table_resolve get multiple copies of table in detail band issue

    resolve method: (1) put table component into the Title band / Page Header band / Summary band, not i ...

  4. org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'null' to required type 'double' for property 'band'; nested exception is org.springframework.core.convert.Con

    本文为博主原创,未经允许不得转载: 先将异常粘贴出来: 20:37:26,909 ERROR [com.suning.fucdn.controller.ProductDataStaticsContro ...

  5. A NEW HYPERSPECTRAL BAND SELECTION APPROACH BASED ON CONVOLUTIONAL NEURAL NETWORK文章笔记

    A NEW HYPERSPECTRAL BAND SELECTION APPROACH BASED ON CONVOLUTIONAL NEURAL NETWORK 文章地址:https://ieeex ...

  6. IOPS、带宽(band width)、吞吐量 (throughput)

    SAN和NAS存储一般都具备2个评价指标:IOPS和带宽(throughput),两个指标互相独立又相互关联.体现存储系统性能的最主要指标是IOPS.   IOPS (Input/Output Per ...

  7. sqlmap利用DNS进行oob(out of band)注入(转)

      0x00 起因 实际案子的时候遇到了一个注入,过狗可以使用sqlmap,但是是基于时间的注入和限制频率需要使用--delay参数,本来就是延时再加上--delay等的心力憔悴.所有有了下面介绍使用 ...

  8. what is out of band mode.

    Most of the steps are the same, except instead of sending an URL as the oauth_callback to request_to ...

  9. Jasper_table_resolve multiple copies of table in detail band issue

    resolve method: (1) put table component into the Title band / Page Header band / Summary band, not i ...

  10. E-UTRA channel bandwidths per operating band (36.101)

    E-UTRA channel bandwidths per operating band (36.101) watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/ ...

随机推荐

  1. birt 批改导出的文件名【转】

    birt 修改导出的文件名 birt 修改导出的文件名分两种实现方法, 第一种:修改 web.xml 中 配置的 BIRT_FILENAME_GENERATOR_CLASS <!-- Filen ...

  2. oracle建索引的可选项

    oracle中建索引可能大家都会,但是建索引是有几个选项参数却很少有人关注,在某些特殊环境下,可能会非常有用,下面一一说明: 1.NOSORT,记录排序可选项. 默认情况下,在表中创建索引的时候,会对 ...

  3. 项目源码--Android即时通讯IM客户端

    下载源码   技术要点: 1.完整精美客户端UI设计 2.自定义控件的灵活使用 3.UI控件的详细使用 4.即时通讯IM协议的实现 5.完整即时通讯IM客户端实现 6.源码详细的中文注释 …….   ...

  4. IIS错误日志:Failed to execute request because the App-Domain

    装上IIS和.net2.0框架后,打开ASP.NET站点,出现Server Application Error,出先此问题,一般先看系统的“事件管理器”,于是查看服务器的“事件管理器”中的“应用程序” ...

  5. [WinForm] 使用反射将业务对象绑定到窗体或控件容器

    在WebForm中,可以使用反射将业务对象绑定到 ASP.NET 窗体控件.最近做Winform项目,也参考WebForm中的代码实现同样的功能.     Winform没有提供类似WebForm中的 ...

  6. 【Android 界面效果34】Android里Service的bindService()和startService()混合使用深入分析

    .先讲讲怎么使用bindService()绑定服务 应用组件(客户端)可以调用bindService()绑定到一个service.Android系统之后调用service的onBind()方法,它返回 ...

  7. 精通CSS高级Web标准解决方案(1-1选择器)

    设计代码的结构 使用有意义的标记 css可以控制页面的外观并将表现与内容分隔开. 在分配ID与类名时尽量保证有意义且与表现无关. div可以对块级元素进行分组,而span可以对行内元素进行分组或标识. ...

  8. POJ 2421 Constructing Roads (最小生成树)

    Constructing Roads Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u ...

  9. UVA 113 Power of Cryptography (数学)

    Power of Cryptography  Background Current work in cryptography involves (among other things) large p ...

  10. Linux公社资料库地址

    免费下载地址在 http://linux.linuxidc.com/用户名与密码都是http://www.linuxidc.com