tgoop.com/Beprogramming/1408
Create:
Last Update:
Last Update:
3) برنامج
لحساب مجموع قيم مدخله بحيث كل مره يسال المستخدم هل انتهيت ؟
اذا كانت الاجابه نعم يتوقف ثم يطبع المجموع
#include <iostream>
#include <string>
using namespace std ;
void main ()
{double x=0,sum=0;
char sto='n';
while (sto!='y' && sto != 'Y')
{
cout<<"\n enter the salary to add:\t ";
cin>>x;
sum=sum+x;
cout<<"you are fenished ? (N\\Y) \t";
cin >>sto;
}
cout<<"THANK YOU \n THE SUM = \t"<<sum <<endl;
}
BY مستـ1ــوى حاسوب
Share with your friend now:
tgoop.com/Beprogramming/1408