Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  test
Language: C/C++
Code:
#include <iostream>

using namespace std;

int main()
{
 float principalamount;
 int days;
 float interest;
 cout<<"Welcome to Stock Market Profit Calculator!!"<<endl;
 cout<<"Enter the Principal Amount:";
 cin>>principalamount;
 cout<<"Enter no of days you want to invest:";
 cin>>days;
 cout<<"Enter a random interest(in percentage) you want to get:";
 cin>>interest;

 for(int i=1;i<=days;i++)
 {
    principalamount += principalamount*(interest/100);
    cout<<"DAY"<<" "<<i<<":"<<" "<<principalamount<<endl;
 }
}
Comments: