There are two banks; Bank A and Bank B. Their interest rates vary. You have received offers from both bank in terms of annual rate of interest, tenure and variations of rate of interest over the entire tenure.
You have to choose the offer which costs you least interest and reject the other.
Do the computation and make a wise choice.
Answers
Answered by
3
yes it makes right choice because he will got profit than other bank.
I hope it helps you.
I hope it helps you.
Answered by
0
//This is The Coding Area
#include <assert.h>
#include <limits.h>
#include <math.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
long int p;
int t,n1,n2,i,j;
scanf("%ld%d%d%d",&p,&t,&n1,&n2);
int pea[n1],peb[n2];
float ra[n1],rb[n2],ai,bi,a = 0,b = 0;
for(i=0;i<n1;i++)
{
scanf("%d%lf",&pea[i],&ra[i]);
a = a+(p*pea[i]*ra[i]);
}
for(j=0;j<n2;j++)
{
scanf("%d%lf",&pea[i],&rb[i]);
b = b+(p*peb[j]*rb[j]);
}
ai = a/(100);
bi = b/(100);
if(ai<bi)
{
printf("Bank A");
}
else
{
printf("Bank B");
}
return 0;
}
Similar questions