band
#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的更多相关文章
- [模拟电路] 2、Passive Band Pass Filter
note: Some articles are very good in http://www.electronics-tutorials.ws/,I share them in the Cnblog ...
- Java band [Cite]
SampleModel 取样模型Databuffer 数据缓冲区 Raster 光栅Sample 样本band 带 SampleModel是java awt中的一个抽象类,它定义了一个接口,用于提 ...
- 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 ...
- 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 ...
- A NEW HYPERSPECTRAL BAND SELECTION APPROACH BASED ON CONVOLUTIONAL NEURAL NETWORK文章笔记
A NEW HYPERSPECTRAL BAND SELECTION APPROACH BASED ON CONVOLUTIONAL NEURAL NETWORK 文章地址:https://ieeex ...
- IOPS、带宽(band width)、吞吐量 (throughput)
SAN和NAS存储一般都具备2个评价指标:IOPS和带宽(throughput),两个指标互相独立又相互关联.体现存储系统性能的最主要指标是IOPS. IOPS (Input/Output Per ...
- sqlmap利用DNS进行oob(out of band)注入(转)
0x00 起因 实际案子的时候遇到了一个注入,过狗可以使用sqlmap,但是是基于时间的注入和限制频率需要使用--delay参数,本来就是延时再加上--delay等的心力憔悴.所有有了下面介绍使用 ...
- 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 ...
- 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 ...
- E-UTRA channel bandwidths per operating band (36.101)
E-UTRA channel bandwidths per operating band (36.101) watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/ ...
随机推荐
- 谈C#中的Delegate
引言 Delegate是Dotnet1.0的时候已经存在的特性了,但由于在实际工作中一直没有机会使用Delegate这个特性,所以一直没有对它作整理.这两天,我再度翻阅了一些关于Delegate的资料 ...
- 代码片段 - Golang 创建 .tar.gz 压缩包
Golang创建 .tar.gz 压缩包 tar 包实现了文件的打包功能,可以将多个文件或目录存储到单一的 .tar 文件中,tar 本身不具有压缩功能,只能打包文件或目录: import " ...
- ls 显示目录和文件的技巧
摘自 http://hi.baidu.com/zaoyuan1217/blog/item/fd69575660366b4fd10906b9.html 要列出当前目录下所有的文件名和目录名直接使用ls命 ...
- [转]SVN:This client is too old to work with working copy 的解决方案
前一段时间,我在Eclipse碰到一个SVN错误,出现的原因是我的Eclipse的SVN插件是1.6,服务器的SVN版本是1.5.4,然后我在工程目录下做了一次提交操作(不是Eclipse里),到最后 ...
- java cpu load
$ps -Lp 179093 cu | more USER PID LWP %CPU NLWP %MEM VSZ RSS TTY STAT START TIME COMMAND admin 17909 ...
- ASP.NET页面与IIS底层交互和工作原理详解(第二回)
引言 在 Part.1 Http请求处理流程 一文中,我们了解了Http请求的处理过程以及其它一些运作原理.我们知道Http管道中有两个可用接口,一个是IHttpHandler,一个是IHttpMod ...
- Java基础--访问权限控制符
今天我们来探讨一下访问权限控制符. 使用场景一:攻城狮A编写了ClassA,但是他不想所有的攻城狮都可以使用该类,应该怎么办? 使用场景二:攻城狮A编写了ClassA,里面有func1方法和func2 ...
- 剑指Offer03 逆序输出链表&链表逆序
多写了个逆序链表 /************************************************************************* > File Name: ...
- 剑指Offer45 约瑟夫环
/************************************************************************* > File Name: 45_LastNu ...
- Storm累计求和中使用各种分组Grouping
Shuffle Grouping: 随机分组, 随机派发stream里面的tuple, 保证bolt中的每个任务接收到的tuple数目相同.(它能实现较好的负载均衡) Fields Grouping: ...