#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. IOS触摸事件和手势识别

    IOS触摸事件和手势识别 目录 概述 触摸事件 手势识别 概述 为了实现一些新的需求,我们常常需要给IOS添加触摸事件和手势识别 触摸事件 触摸事件的四种方法 -(void)touchesBegan: ...

  2. Linux编程之《看门狗进程》

    Intro 当我们编写服务器代码时,为了让自己的服务器在意外崩溃时能够及时的重启,软件看门狗就显示出它的作用了,该看门狗进程是通过fork一个子进程(业务进程),父进程一旦捕获到了子进程的结束信号就重 ...

  3. [golang学习] goroutine调度

    这两天有些闲功夫, 学习下golang, 确实非常简洁. 不过有些缺憾. 在我的测试中. golang的调度(goroutine)似乎不是非常好. func say(k int) { fmt.Prin ...

  4. A4 打印长宽

    我是用下面的转换公式,将A4纸转为在屏幕中的分辨率 页边距: 0.75 inchA4: 8.27x11.69 inch打印机DPI:600DPI屏幕DPI  : 96DPIwidth = (8.27  ...

  5. C# mvc--ORM框架中EF的作用和特点

    存放于System.Linq.QueryAble 静态类中 并且所有的扩展方法扩展自 IqueryAble<TSource>泛型接口上 用途: 接收lambda表达式 利用EF生成对应的s ...

  6. solr安全-tomcat

    1.1. tomcat部署1 参考文档:solr安全机制 1.1.1. 加上安全机制的必要性 在前面有提到, Solr 本身是不加安全机制的, 所有的查詢.admin.update 這些指令都可以經由 ...

  7. mysql 查看表记录新增、修改的时间

    ALTER TABLE `tableName` ADD `updateAt` TIMESTAMP NULL ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE kd_up ...

  8. nodejs 实现 http proxy 透明转发

    这两天需要安装一个Linux虚拟机,接下来要通过 yum 来安装需要的软件. 因单位的网络需要通过代理才能访问外网,公司代理服务器:proxy.xxxx.com,给yum增加了proxy设置: # v ...

  9. 重构11-Switch to Strategy(Switch到策略模式)

    重构没有固定的形式,多年来我使用过不同的版本,并且我敢打赌不同的人也会有不同的版本. 该重构适用于这样的场景:switch语句块很大,并且会随时引入新的判断条件.这时,最好使用策略模式将每个条件封装到 ...

  10. 重构6-Push Down Field(字段下移)

    与上移字段相反的重构是下移字段.同样,这也是一个无需多言的简单重构. public abstract class Task { protected String _resolution; } publ ...