Jump to content
منتدى البحرين اليوم

مغرور جدا

الاعضاء الفعالين
  • مشاركات

    97
  • انضم

  • آخر زيارة

Everything posted by مغرور جدا

  1. الله يسلمكم.. وحاضرين لكم.. بس ليش تقولون مشكورة اختي ومشكورة اختي!! الاسم يدل على بنت يعني؟!!!!!!!!!!!!!
  2. اول كورس لي وما بدلت شي وما دفعت فلوس حتى بس اخذت الجدول
  3. المزيد.. وبس المعذرة على التقصير..
  4. الفنكشن هو امر يقوم بعملية معينة عند استدعائه في البرنامج.. كل لايبرري في السي++ (iostream او math مثلا) يحتوي عدد من الفنكشنز.. ويمكن للمبرمج ايضا كتابة فنكشن خاص به.. main هو الفنكشن الرئيسي الذي يبدأ منه البرنامج يعني ضروري يكون في main cout مثلا هذا فنكشن الاوت بت و cin فنكشن ان بت.. ما ادري شنو بالضبط الي مو فاهمته في الفنكشن؟
  5. قصدك في اي سؤال منامي؟؟؟ الاول ولا الثاني؟؟
  6. اهمه ما يبونج اتحطين قيمة من عندج اهو البرنامج وظيفته يجرب الارقام من 1 الى 1000 ويشوف اي واحد فيهم بيرفكت يعرضه..
  7. الاول هذا #include <iostream.h> int main() { int h, m, s, x,y; cout << "Enter the first time as three integers: "; cin >> h >> m >> s; x= 3600*h + 60*m +s; cout << "Enter the second time as three integers: "; cin >> h >> m >> s; y = 3600*h + 60*m + s; cout << "The difference between the times is " << y-x << " seconds" << endl; return 0; } والثاني #include <iostream.h> int main(){ int x,t,i,j; cout<<"Perfect numbers from 1 to 1000: "<<endl; for(x=1; x<1000;x++){ t=0; for(i=1; i<x; i++) {if (x%i == 0){t=t+i;} } if (t==x){cout<<x<<"= "; for (j=1; j<x; j++){if (x%j == 0){cout<<"+"<<j;} }cout<<endl; } }return 0;} وبااااااااي
  8. Try this #include<iostream.h> void main() { int x,q; float price,t; x = 1; switch(x) { case 1: price= 2.98; cout<<"Enter quantity sold for the product 1: "; cin>>q; t = price*q; cout<<"\nTotal price for this product is: "<<price*q; case 2: price= 4.50; cout<<"\nEnter quantity sold for the product 2: "; cin>>q; t = t+price*q; cout<<"\nTotal price for this product is: "<<price*q; case 3: price= 9.98; cout<<"\nEnter quantity sold for the product 3: "; cin>>q; t = t+price*q; cout<<"\nTotal price for this product is: "<<price*q; case 4: price= 4.49; cout<<"\nEnter quantity sold for the product 4: "; cin>>q; t = t+price*q; cout<<"\nTotal price for this product is: "<<price*q; case 5: price= 6.87; cout<<"\nEnter quantity sold for the product 5: "; cin>>q; t = t+price*q; cout<<"\nTotal price for this product is: "<<price*q; break; } cout<<"\nTotal Price = "<< t<<endl; }
  9. يبون الفنكشن بدون الماث لايبرري!! هذا المكتوب.. اذا غلط صححيه لي انتي اللي تدرسين المادة انه بعدي لأن مقبول الفصل الثاني!!
  10. هذا الاول #include <iostream.h> int main() { int h, m, s, x,y; cout << "Enter the first time as three integers: "; cin >> h >> m >> s; x= 3600*h + 60*m +s; cout << "Enter the second time as three integers: "; cin >> h >> m >> s; y = 3600*h + 60*m + s; cout << "The difference between the times is " << y-x << " seconds" << endl; return 0; }
  11. وهذا الثاني #include <iostream.h> void main() { int side,i,j; cout<<"Enter side size: "; cin>>side; for (i=0; i<side;i++) { for (j=0; j<side;j++) cout<<"*"; cout<<"\n"; } }
  12. هذا الأول #include<iostream> using namespace std; int power(int a, int b); int main() { int a,b; cout<<"Enter an integer"<<endl; cin>>a; cout<<"To what power would you like to raise it?"<<endl; cin>>b; cout<<a<<" raised to the power of "<<b<<" is "<<power(a,b)<<endl; return 0; } int power(int a, int b) { int result = a; for(int i=1;i<b;i++) { result *= a; } return result; }
  13. مبروك عليكم الامتحان السهل.. احد يقدر يحط لنا اسئلة الامتحان؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟
  14. اختي هذا هو ولكن لو تحصلين تأكيد من عند احد يدرس المادة راح يكون احسن اكيد # include <iostream.h> int main () { int x;float f,s,h; cout<<"Choose employee type:"<<endl<<"1- Managers"<<endl<<"2- Hourly workers"<<endl<<"3- Commission workers"<<endl<<"4- pieceworkers"<<endl; cin>>x; switch (x) { case(1): cout<<"Managers fixed weekly salary is $1000"<<endl; break; case(2): cout<<"Enter number of hours worked"<<endl; cin>>h; if (h <= 40){ s = h*10; cout<<"salary for this worker is $"<<s<<endl;} else { h = h-40; f = h*5; s = 400+f; cout<<"salary for this worker is $"<<s<<endl;} break; case(3): cout<<"Enter worker's gross weekly sales: "; cin>>h; f= h*0.057; s = 250+f; cout<<"salary for this worker is $"<<s<<endl; break; case(4): cout<<"enter rate per each produced item: "; cin>>h; cout<<"Enter number of items produced by worker: "; cin>>f; s = h*f; cout<<"salary for this worker is $"<<s<<endl; default: cout<<"wrong choice\n"<<endl; } return 0; }
  15. مشكور على مرورك. على الاقل رد واحد!! ههههههههههههههههه
×
×
  • Create New...