Skip to main content

C++ program to calculate compound interest by simple interest

#include<iostream.h>
#include<conio.h>
void main()
{
long float interest, prince, rate, amt;
int time, temp, r;
char choice;
do
{
clrscr ();
cout<<"PLEASE ENTER THE PRINCIPAL AMOUNT : ";
cin>>prince;
cout<<"\nENTER THE RATE OF INTEREST : ";
cin>>rate;
cout<<"\nENTER THE TIME : ";
cin>>time;
amt=prince;
cout<<"\n\tTIME\tSIMPLE INTEREST\tAMOUNT";
for(r=8, temp=0,interest=0;temp<=time;temp++, r++)
{
cout<<"\n\t"<<temp<<"\t"<<interest;
gotoxy(33,r);
cout<<amt;
interest=(amt*rate)/100;
amt=amt+interest;
}
cout<<"\n\tClosing"<<"\t"<<interest;
cout<<amt;
cout<<"\n\nTHUS, THE FINAL AMOUNT IS : "<<amt;
cout<<"\n\nREPEAT? (y/n) : ";
cin>>choice;
if(choice=='n'||choice=='N')
cout<<"\nTHANK YOU";
getch();
}while(choice=='y'||choice=='Y');
}

Comments

Popular posts from this blog

AirBnB Infographic Journey to IPO

  Full Post at  https://techpomelo.com/2020/10/infographics-airbnb-milestone-journey-to-ipo/

8 common methods for server performance optimization

  1. Use an in-memory database In-memory database is actually a database that puts data in memory and operates directly. Compared with the disk, the data read and write speed of the memory is several orders of magnitude higher. Saving the data in the memory can greatly improve the performance of the application compared to accessing it from the disk. The memory database abandoned the traditional way of disk data management, redesigned the architecture based on all data in memory, and made corresponding improvements in data caching, fast algorithms, and parallel operations, so the data processing speed is faster than that of traditional databases. Data processing speed is much faster.       But the problem of security can be said to be the biggest flaw in the memory database. Because the memory itself has the natural defect of power loss, when we use the memory database, we usually need to take some protection mechanisms for the data on the memory in advance, such...