مشاهدة النسخة كاملة : ارجوكم سااااعدوني عاجل


"الطموحه"
15-04-2007, 04:22 AM
كيف الحاااال

يااااااااااارب ياررب ماتفشل ويحلون لي http://www.arabmoheet.net/forum/editor/smiles/cry2.gif

الله يخليكم الي يعرف لايبخل علي جعلكم في الجنه http://www.arabmoheet.net/forum/editor/smiles/flower2.gif

ابي حل لثلاث اكسرسايزات مو شرط كلهم لو واحد ويخب علي http://www.arabmoheet.net/forum/editor/smiles/redface2.gif


exercise 1


Description of the problem

Develop a C++ program that will determine if a department-store customer has exceeded the credit limit on a charge account.For each customer, the following information is available:

a) account number (an integer);

b) balance at the beginning of the month;

c) total of all items charged by the customer this month;

d) total of all credits applied to the customer's account this month;

e) allowed credit limit;




// account.cpp


#include <iostream>

using std::cout;
using std::cin;
using std::endl;
using std::fixed;

#include <iomanip>

using std::setprecision;

int main()
**
int accountNumber; // customers account number
double balance; // customers balance
double charges; // charges on the account
double credits; // credits to the account
double limit; // credit limit on the account

cout << "Enter account number (-1 to end): " << fixed;

/* write code to read the customer’s account number here */

/* begin loop here */ **
/* prompt and read the customer’s balance here */
/* prompt and read the customer’s charges here */
/* prompt and read the customer’s credits here */
/* prompt and read the customer’s credit limit here */
/* calculate the new customer’s balance here */

/* determine if customer’s credit limit is exceeded */
/* if customer’s limit is exceeded print message */

cout << "\nEnter account number (-1 to end): ";
/* write code to read the customer’s account number here */
} // end while loop

cout << endl; // ensure all output is displayed

return 0;

} // end main







exercise 2




// wagecalculator.cpp
#include <iostream>

using std::cout;
using std::cin;
using std::endl;
using std::fixed;

#include <iomanip>

using std::setprecision;

int main()
**
/* declare program variables here */

cout << "Enter hours worked (-1 to end): " << fixed;

cin >> hours;

/* write code to begin loop here */ **
/* write code here to prompt and input hourly rate */

/* write code here to determine if hours worked are less
than or equal to 40 and if so, calculate base pay.
If not, calculate base + overtime pay */
cout << "Salary is $" << setprecision( 2 ) << salary
<< "\n\nEnter hours worked (-1 to end): ";
cin >> hours;
}

return 0;

} // end main





exercise 3






// triples.cpp
#include <iostream>

using std::cout;
using std::endl;

int main()
**
int count = 0;
long hyptSquared; // hypotenuse squared
long sidesSquared; // sides squared

for ( /* write header for side1 */ ) **

for ( /* write header for side2 */ ) **

for ( /* write header for hyptSquared */ ) **
/* calculate hyptSquared */
/* calculate the sum of the sides squared */

if ( hyptSquared == sidesSquared ) **
cout << side1 << "\t" << side2 << "\t"
<< hypt << "\n";
++count;

} // end if

} // end for

} // end for

} // end for

cout << "A total of " << count << " triples were found."
<< endl;

return 0;

} // end main





حاولو معي لو مجرد محاوله شاكره لكم

اتمنى يكون قبل يوم الثلاثا القادم http://www.arabmoheet.net/forum/editor/smiles/flower2.gif

منطلق بطموحي
15-04-2007, 10:25 AM
السلام عليكم:

السؤال معطيك حتى شكل البرنامج ! ما عليك الا اكمال الفراغات ...
حاولي به و ان كانت هناك مشكلة سنساعدك

Hosain21
12-05-2007, 03:15 PM
السلام عليكم
السؤال الأول في المرفقات

الأسئلة الباقية لا أعرف المطلوب