#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. &quot;undefined reference to&quot; 问题解决方法

    近期在Linux下编程发现一个诡异的现象,就是在链接一个静态库的时候总是报错,类似以下这种错误: (.text+0x13): undefined reference to `func' 关于undef ...

  2. MYSQL 博客

    DavidYang的博客 - CSDN.NET DimitriK's (dim) Weblog Xaprb · Stay Curious! 飞鸿无痕的博客 - ChinaUnix博客 何登成的技术博客 ...

  3. iOS iphone5屏幕适配 autosizing

    转自:http://blog.sina.com.cn/s/blog_a843a8850101jxhh.html iphone5出来了,从不用适配的我们也要像android一样适配不同分辨率的屏幕了. ...

  4. IPC——匿名管道

    Linux进程间通信——使用匿名管道 在前面,介绍了一种进程间的通信方式:使用信号,我们创建通知事件,并通过它引起响应,但传递的信息只是一个信号值.这里将介绍另一种进程间通信的方式——匿名管道,通过它 ...

  5. JB开发之二 [jailbreak,越狱开发研究]

    1.更换壁纸:把图片写到这个目录,/var/mobile/Library/LockBackground.jpg,然后kill the Springboard. 2.把程序添加进通知中心(iOS5以上) ...

  6. 深入理解Redis中的主键失效及其实现机制

    参考:http://blog.sina.com.cn/s/articlelist_1221155353_0_1.html 作为一种定期清理无效数据的重要机制,主键失效存在于大多数缓存系统中,Reids ...

  7. Linux 命令 alternatives和update-alternatives

    参考: http://lionbule.iteye.com/blog/717722 http://manpages.ubuntu.com/manpages/oneiric/man8/update-al ...

  8. (转)乐观的并发策略——基于CAS的自旋

    悲观者与乐观者的做事方式完全不一样,悲观者的人生观是一件事情我必须要百分之百完全控制才会去做,否则就认为这件事情一定会出问题:而乐观者的人生观则相反,凡事不管最终结果如何,他都会先尝试去做,大不了最后 ...

  9. 关于linux系统安全配置脚本

    本脚本是第二次更新,已经大量应用在某大型媒体网站体系中,加入了之前没有想到的一些安全设置.使用方法将其复制,保存为一个shell文件,比如security.sh.将其上传到Linux服务器上,执行sh ...

  10. 通过继承nsoperation的方法--处理复杂任务

    #import <Foundation/Foundation.h> @class TTOperation; @protocol TTOperationDelegate <NSObje ...