Answer to Question #339184 in C++ for alemante teju

Question #339184

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

1
Expert's answer
2022-05-12T08:19:26-0400
#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;

}



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS