لو سمحتوا أبغى شرح لهذا البرنامج و كيف يعمل:
#include<iostream>
using namespace std;
int main()
{
double balance = 50.00;
int count = 0;
cout<<"This program tells you how long it takes"<<endl;
<<"to accumulate a dept of $100 , starting with "<<endl;
<<"an initial balance of $50 owed. "<<endl;
<<"The interest rate is 2% per month . "<<endl;
while(balance <100.00)
{
balance=balance +0.02*balance;
count++;
}
cout<<"After "<<count <<"monthes,"<<endl;
cout.setf(ios::fixed);
cout.setf(ios::showpoint);
cout.precision(2);
cout<<"Your balance due will be $"<<balance <<endl;
return 0;
}و لكم جزيل الشكر ....