سورس برنامه محاسبه حقوق
پنج شنبه 3 اسفند 1391 2:21 PM
سورس برنامه محاسبه حقوق
#include <iostream.h>
#include <conio.h>
class time
{
public:
void get_time ();
void show_hour ();
void show_min ();
void show_sec ();
void cal_salary ();
private:
int hour,min,time;
long int sec;
};// end of class
//________________________________paiane moarefi_______________________________
void time::cal_salary()
{
cout<<"hooghoogh karmand = "<<hour*5000+min*20<<endl;
}// end of void time::cal_salary()
//___________________paiane tarife meghdar pole tabe hoghogh___________________
void time::get_time()
{
cout<<"lotfan zaman khod ra bar hasbe sanie vared konid"<<endl;
cin>>time;
}//end of void time::get_time()
//______________________paiane gereftane zamane tabe hoghogh___________________
void time::show_hour()
{
hour=time/3600;
cout<<"sa'at = "<<hour<<endl;
}// end of void time::show_hour()
//____________________paiane mohasebeie sa'at tabe hoghogh_____________________
void time::show_min()
{
min=((time%3600)/60);
cout<<"daghighe = "<<min<<endl;
}//end of void time::show_min()
//___________________paiane mohasebeie daghighe tabe hoghogh___________________
void time::show_sec()
{
sec=time%60;
cout<<"sanie = "<<sec<<endl;
}// end of void time::show_sec()
//____________________paiane mohasebeie sanie tabe hoghogh_____________________
int main ()
{
time t;
t.get_time();
t.show_hour();
t.show_min();
t.show_sec();
t.cal_salary();
return 0;
}// end of int main
//_________________paiane piade sazi kole tavabe tabe hoghogh__________________
Seyyed.Reza.Hashemian@Gmail.Com
دوستانی که سوالی دارند یا مایل به تماس هستند می توانند از اطلاعات بالا استفاده نمایند.
اگر هم تایپکی زدید و احتیاج به پاسخگویی سریع داشتید اطلاع دهید