• پایان فعالیت بخشهای انجمن: امکان ایجاد موضوع یا نوشته جدید برای عموم کاربران غیرفعال شده است

درخواست چند برنامه ساده با ++C ( خیلی مهم) تا چهارشنبه وقت دارم

Nazila_Moosavi

کاربر تازه وارد
تاریخ عضویت
15 سپتامبر 2009
نوشته‌ها
4
لایک‌ها
0
سلام دوستان عزیز

من چند تا برنامه ساده با استفاده از ++C میخوام برای دانشگاه و تا چهارشنبه 8.4.90 مهلت هست.

از دوستانی که این زبان رو بلد هستند تقاضای کمک میکنم.

یکی از برنامه ها اینه :

یک ماشین حساب ساده که چهار عمل اصلی رو انجام بده و انتگرال رو معین کنه.

و چند برنامه دیگه که در صورت درخواست عزیزان برای راهنمایی مینویسم.

هزینه ای هم اگه داره توافقی پرداخت میکنم.

لطفا اسپم نفرستید. فقط جواب و کمک

از زحمات همه تشکر میکنم.
 

>-->O

همکار بازنشسته
تاریخ عضویت
25 نوامبر 2009
نوشته‌ها
2,530
لایک‌ها
468
محل سکونت
㋡ همین جا ㋡
*دوست عزیز بهتره تمرین های رو که به شما میدهند خودتان حل کنید و هر جا به مشکل برخورد کردید از دوستان راهنمائی بخواهید نه اینکه کل پروژه را واگذار کنید به دوستان
اگر علاقه به برنامه نویسی داری
اگر هم که نه باید در بخش سفارشات تاپیک میزدید تا به عنوان سفارش دوستان کار شما را راه بیاندازن

به هر حال برای کمک به شما سورس ماشین حساب برایتان قرار میدهم

کد:
#include <iostream.h> //including lib. 
#include <math.h> //including lib. 
#include <cstring.h> //including lib. 
//Prototypes functions 
void description();//Description cout fuction. 
float full_efficiency(int miles, int gallons);//efficiency function. 
float cost(float price, int gallons); //Cost function. 
int main()//Main Function 

    { string gas_station;//String for gas station name. 
    int num_miles; // Variable for number of miles 
    int num_gallons;//Variable for number of gallons. 
    float price_per_gallons;//Variable for price per gallons. 
    float efficiency; //variable for efficiency. 
    float cos; //variable for cost 
    int a; //keeps screen function 
    description(); //Discription function 
    cout<< "Enter gas station name\n"; 
    getline(cin, gas_station); //Getting gas station title 
    cout<< "Name of gas station Is " << gas_station <<".\n"; 
    cout<<endl; 
    cout<< "Enter the numbers of miles travel.\n"; 
    cin>>num_miles;//storing numbers of miles 
    cout<< "Enter the number of gallons of gasoline purchased.\n"; 
    cin>>num_gallons;//storing number of gallons 
    cout<< "Enter the Price per gallons.\n"; 
    cin>>price_per_gallons;//storing price per gallons 
    efficiency = full_efficiency(num_miles,num_gallons);//calling function. 
    cos =cost(price_per_gallons,num_gallons);//calling function. 
    cout<<"The efficiency is "<<efficiency<<" for " 
    <<num_miles<<" miles per number of "<<num_gallons<<" gallons\n"; 
    cout<<"Gallons used on the trip is "<<num_gallons<<" The cost of the trip " 
    <<"is "<<"$"<< cos <<endl; 
    cin>>a; //keeps screen open 
    return 0;//returning value 
} 

void description() 

    { 
     cout<< "Program calculates the fule effiency of the car on the trip\n" 
     << "in miles/gallon and the cost for gasoline at the end of the\n" 
    << "trip.\n"; 
} 

float full_efficiency(int miles, int gallons) 

    { 
     float efficien; //efficiency variable 
     efficien = miles/gallons; 
     return (efficien);//returning value 
} 

float cost(float price, int gallons) 

    { 
     float charge;//charge variable 
    charge = price*gallons; 
    return (charge); //returning value 
}
 
بالا