السلام عليكم ورحمة الله وبركاته
أنا العضوة الجديدة صوت العلم
ادرس برمجة حاسب سنه اولى
بس ماني فاهمه اي شي
وأستاذتنا اعطتنا تمارين وماعارفه احلهم بليز ساااااااااااااعدوني
مين يقدر يحل البرامج الثلاث ويشرح لي
ملاحظه:
لازم تكون جميع البرامج يوم الجمعه جاهزه لأن التسليم يوم السبت.
البرنامج الاول :
//account.cpp
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
using std::fixed;
#include <iomanip>
usig std::setprecision;
int main()
{
int account number;//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 accounter number here */
} //end while loop
cout<< endl; //endsure all output is displayed
return 0;
} //end main
الله يخليكم ساعدوني
البرنامج الثاني :
//wagecalculator.cpp
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
using std::fixed;
#include <iomanip>
usig std::setprecision;
int main()
{
/*declareprogram 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;
}
تكفوووووووووووووووووووون
البرنامج الثالث:
بكره انزله
وشكرا..