Write a C++ program to solve the following problems (Red colour texts are to indicate user inputs that can be changed)
Out Put
Enter your Account Number: 2000342200267
Enter your Name: Abebe Kebede
Enter the amount: 1000
How long to keep it (number of month): 10
Dear Abebe Kebede
Acc: 2000342200267
After 10 Months you will get a total of 700 Birr Interest
Your Balance will be = 1700 Birr
#include <iostream>
#include <string>
using namespace std;
int main()
{
long long number;
cout << "\tEnter your Account Number: ";
cin >> number;
string name= "Abebe Kebede ";
cout << "\tEnter your Name: "<< name << endl;
int amount;
cout << "\tEnter the amount: ";
cin >> amount;
int nmonth;
cout << "\tHow long to keep it (number of month): ";
cin >> nmonth;
cout<<endl;
cout << "Dear " << name << endl;
cout <<"Acc: "<<number<< endl;
int total = nmonth * amount * 7 / 100;
cout << "After " << nmonth << " Months you will get a total of " << total << " Birr Interest" << endl;
cout << "Your Balance will be = " << amount + total << " Birr " << endl;
}
Comments
Leave a comment