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/ ...
随机推荐
- innobackupex 备份实验
[root@localhost ~]# xtrabackup -v xtrabackup version based Linux (x86_64) (revision id: 45cda89) [ro ...
- PHP版根据经纬度和半径计算出经纬度的范围
百度地图提供了范围搜索的功能,但是它使用的是百度自己的数据,但是有时候我们需要使用自己的数据,显示在地图上.比如给定两个参数:指定位置(某一处的经纬度lnglat)和搜索半径(r),搜索指定范围内的数 ...
- 讲讲你不知道的 ARC (一)
来源:伯乐在线 - 酷酷的哀殿 链接:http://ios.jobbole.com/89420/ 点击 → 申请加入伯乐在线专栏作者 内容提要 通过阅读本篇文章,希望您能了解:如何在 ARC 下,强制 ...
- linux环境中 对tomcat配置java环境
JAVA_OPTS="$JAVA_OPTS -Xms1024m -Xmx2048m -XX:MaxPermSize=512m" JAVA_HOME="/weblogic1 ...
- 【Shell脚本学习7】Shell脚本学习指南分享
http://yunpan.cn/cyARvNiaiLhfR (提取码:2878)
- php 笔试面试 总结
一次小小的笔试面试经历,虽然是一些简单的问题,但是自己在这儿总结一下,也查一些资料,得出一些较好的答案,也能帮助自己成长. 1.自己熟悉的http状态码及其意义 其实这个题答案随处可见.这儿也还是记录 ...
- [转]div 让文字或图片居中
本文转自:http://qsfwy.iteye.com/blog/250206 在div 中让 文字或图片居中,请参考以下代码1: - - - - - - - - - - - - - - - - - ...
- CF Soldier and Badges (贪心)
Soldier and Badges time limit per test 3 seconds memory limit per test 256 megabytes input standard ...
- Nginx负载趟过的坑
在项目中经常会碰到需要利用Nginx作负载,最近在利用Nginx作负载均衡器时碰到一个很奇葩的问题. 本来按照以前的实现将打好的A.war包直接放到tomcat根目录(webapps)下,然后按照如下 ...
- html+css--水平居中总结(不定宽块状元素方法)(一)
来源:http://www.imooc.com/code/6363 在实际工作中我们会遇到需要为“不定宽度的块状元素”设置居中,比如网页上的分页导航,因为分页的数量是不确定的,所以我们不能通过设置宽度 ...