ar
Feedback
لغة ال++Cخطوة بخطوة

لغة ال++Cخطوة بخطوة

الذهاب إلى القناة على Telegram

💻 الى المهندسين والمبرمجين ومحبي البرمجة والحاسوب 👈👈سوف يتم شرح لغه ال++C للمبتدئين حتى الاحتراف 👈👈 دورات مجانية 👈👈 مشاريع مفتوحة المصدر + اكواد 👈👈كتب برمجة وحاسوب #للسوال_او_الاستفسار @alhussini_IT

إظهار المزيد
3 443
المشتركون
لا توجد بيانات24 ساعات
-37 أيام
-3530 أيام
أرشيف المشاركات
♥️🎗بـــرنــ₰ 7️⃣1️⃣ ₰❥ـامــــج 🎗♥️ 👈 اكتب الشكل العام لبرنامج لغة ++C؟ ❥➺┊@programming_languages_IT_CS !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 #include <iostream> using namespace std; int main () { return 0; } !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 ✍✍ محمد الحسيني ╭─┅═ঊঈ⚠ঊঈ═┅─╮ ☛    @alhussini_IT   ☚ ╰─┅═ঊঈ☠ঊঈ═┅─╯

♥️🎗بـــرنــ₰ 6️⃣1️⃣ ₰❥ـامــــج 🎗♥️ 👈 اكتب برنامج لفهرس القرآن الكريم مثال ان يدخل المستخدم رقم السورة كالتالي :- البرنامج يطلب من المستخدم ادخال رقم السورة المراد بيانات عليها /// رقم السورة المدخله من قبل المستخدم // enter the number of the Surah البرنامج يقوم بجلب جميع البيانات على رقم السورة كالتالي // رقم السورة / /1 :number | اسم السورة // name: ALFATIHA عدد آياتها //7 :ayat هل هي مكيه ام مدنية / / place: MK | صفحه السورة//1 :page ❥➺┊@programming_languages_IT_CS !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 #include <iostream> #include <fstream> #include <string> using namespace std; struct Surah {     int number;     string name;     int ayat;     string place;     int page; }; void displaySurah(const Surah& surah) {     cout << "رقم السورة: " << surah.number << endl;     cout << "اسم السورة: " << surah.name << endl;     cout << "عدد آياتها: " << surah.ayat << endl;     cout << "هل هي مكية أم مدنية: " << surah.place << endl;     cout << "صفحة السورة: " << surah.page << endl; } int main() {     ifstream file("quran.txt"); // اسم الملف الذي يحتوي على بيانات القرآن         if (!file) {         cerr << "Unable to open file." << endl;         return 1;     }         int surahNumber;         cout << "Enter the number of the Surah: ";     cin >> surahNumber;     string line;     while (getline(file, line)) {         Surah surah;         // قراءة بيانات السورة من الملف         file >> surah.number >> surah.name >> surah.ayat >> surah.place >> surah.page;         if (surah.number == surahNumber) {             displaySurah(surah);             break; // توقف عن قراءة المزيد من البيانات بعد إيجاد السورة المطلوبة         }                 getline(file, line); // تجاوز نهاية السطر     }     file.close();     return 0; } 👈يرجى ملاحظة أنه يجب وضع ملف يحتوي على بيانات القرآن في نفس المجلد مع ملف التشغيل وتغيير اسم الملف في ifstream file("quran.txt"); إلى اسم الملف الصحيح !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 ✍✍ محمد الحسيني ╭─┅═ঊঈ⚠ঊঈ═┅─╮ ☛    @alhussini_IT   ☚ ╰─┅═ঊঈ☠ঊঈ═┅─╯

♥️🎗بـــرنــ₰ 5️⃣1️⃣ ₰❥ـامــــج 🎗♥️ 👈 اكتب برنامج يدخل المستخدم رقم الشهر وكذالك السنه لهذا الشهر ثم يقوم بطباعه اسم الشهر وايامه واذا كان الشهر( February) يطبع عدد الايام ۲۹ يوم اذا كانت السنه كبيسه اي تقبل القسمه على (٤) مالم فيطبع عدد ايامه (۲۸)؟ ❥➺┊@programming_languages_IT_CS !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 #include <iostream> using namespace std; int main() {     int month, year;         cout << "Enter the month number: ";     cin >> month;         cout << "Enter the year: ";     cin >> year;         switch(month) {         case 1:             cout << "January has 31 days." << endl;             break;         case 2:             if (year % 4 == 0) {                 cout << "February has 29 days." << endl;             } else {                 cout << "February has 28 days." << endl;             }             break;         case 3:             cout << "March has 31 days." << endl;             break;         case 4:             cout << "April has 30 days." << endl;             break;         case 5:             cout << "May has 31 days." << endl;             break;         case 6:             cout << "June has 30 days." << endl;             break;         case 7:             cout << "July has 31 days." << endl;             break;         case 8:             cout << "August has 31 days." << endl;             break;         case 9:            cout<<"September has (30)days"<<endl;            break;          case10:           cout<<"October has (31)days"<<endl;           break;          case11:           cout<<"Novemberhas(30)days"<<endl;           break;          case12:           cout<<"Decemberhas(31)days"<<endl;            break;                      default:            cout<<"Invalid input. Please enter a valid month number (1-12)."<<endl;     }         return 0; } !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 ✍✍ محمد الحسيني ╭─┅═ঊঈ⚠ঊঈ═┅─╮ ☛    @alhussini_IT   ☚ ╰─┅═ঊঈ☠ঊঈ═┅─╯

♥️🎗بـــرنــ₰ 4️⃣1️⃣ ₰❥ـامــــج 🎗♥️ 👈 اكتب برنامج لايجاد قيمة الحروف من (A-Z) في ASCII CODE (اسكي كود)؟ مثال (65=A) ❥➺┊@programming_languages_IT_CS !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 #include <iostream> using namespace std; int main() {     for (char c = 'A'; c <= 'Z'; ++c) {         cout << "Character: " << c << ", ASCII Code: " << int(c) << endl;     }     return 0; } !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 ✍✍ محمد الحسيني ╭─┅═ঊঈ⚠ঊঈ═┅─╮ ☛    @alhussini_IT   ☚ ╰─┅═ঊঈ☠ঊঈ═┅─╯

♥️🎗بـــرنــ₰ 3️⃣1️⃣ ₰❥ـامــــج 🎗♥️ 👈 اكتب برنامج  لايجاد قواسم عدد مدخل من قبل المستخدم؟ ❥➺┊@programming_languages_IT_CS !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 #include <iostream> using namespace std; int main() {     int number;     cout << "Enter a number: ";     cin >> number;     cout << "Factors of " << number << ": ";     for (int i = 1; i <= number; ++i) {         if (number % i == 0) {             cout << i << " ";         }     }     return 0; } !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 ✍✍ محمد الحسيني ╭─┅═ঊঈ⚠ঊঈ═┅─╮ ☛    @alhussini_IT   ☚ ╰─┅═ঊঈ☠ঊঈ═┅─╯

♥️🎗بـــرنــ₰ 2️⃣1️⃣ ₰❥ـامــــج 🎗♥️ 👈 اكتب برنامج  باستخدام for يأخذ عداد من 1 الى ۱۰ وباستخدام break يخرج من الحلقة بعد طباعة الرقم4 ❥➺┊@programming_languages_IT_CS !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 #include <iostream> using namespace std; int main() {     for (int i = 1; i <= 10; i++) {         cout << i << endl;         if (i == 4) {             break;         }     }         return 0; } !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 ✍✍ محمد الحسيني ╭─┅═ঊঈ⚠ঊঈ═┅─╮ ☛    @alhussini_IT   ☚ ╰─┅═ঊঈ☠ঊঈ═┅─╯

♥️🎗بـــرنــ₰ 1️⃣1️⃣ ₰❥ـامــــج 🎗♥️ 👈 اكتب برنامج باستخدام حلقة for يأخذ عداد من ١ الى ١٠ ويطبع الأعداد الزوجية فقط وباستخدام continue ❥➺┊@programming_languages_IT_CS↷ !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 #include <iostream> using namespace std; int main() { for (int i = 1; i <= 10; ++i) { if (i % 2 == 1) { continue; } cout << i << " "; } return 0; } !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 ✍✍ محمد الحسيني ╭─┅═ঊঈ⚠ঊঈ═┅─╮ ☛    @alhussini_IT   ☚ ╰─┅═ঊঈ☠ঊঈ═┅─╯

♥️🎗بـــرنــ₰ 0️⃣1️⃣ ₰❥ـامــــج 🎗♥️ 👈 اكتب برنامج لطباعة الأعداد من ١ إلى ١٠ باستثناء ٤ و ۷ باستخدام continue ؟ ❥➺┊@programming_languages_IT_CS !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 #include <iostream> using namespace std; int main() {     for (int i = 1; i <= 10; i++) {         if (i == 4 || i == 7) {             continue;         }         cout << i << " ";     }         return 0; } !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 ✍✍ محمد الحسيني ╭─┅═ঊঈ⚠ঊঈ═┅─╮ ☛    @alhussini_IT   ☚ ╰─┅═ঊঈ☠ঊঈ═┅─╯

هذة الشكل
هذة الشكل

♥️🎗بـــرنــ₰ 9️⃣ ₰❥ـامــــج 🎗♥️ 👈 اكتب كود يقوم بطباعة الشكل الاتي ❥➺┊@programming_languages_IT_CS !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 #include <iostream> using namespace std; int main() {             for (int i = 1; i <= 10; ++i) {         for (int j = 1; j <= 10 - i; ++j) {             cout << " ";         }         for (int k = 1; k <= i; ++k) {             cout << "* ";         }         cout << endl;     }     return 0; } !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 ✍✍ محمد الحسيني ╭─┅═ঊঈ⚠ঊঈ═┅─╮ ☛    @alhussini_IT   ☚ ╰─┅═ঊঈ☠ঊঈ═┅─╯

♥️🎗بـــرنــ₰ 8️⃣ ₰❥ـامــــج 🎗♥️ 👈 قم بشرح البرنامج التالي مع كتابه مخرجاته على الشاشة :- هذه عليكم لانوة بسيط 🤷 !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 ✍✍ محمد الحسيني ╭─┅═ঊঈ⚠ঊঈ═┅─╮ ☛    @alhussini_IT   ☚ ╰─┅═ঊঈ☠ঊঈ═┅─╯

هذه مخرجات البرنامج نفس الشكل بالظبط
هذه مخرجات البرنامج نفس الشكل بالظبط

♥️🎗بـــرنــ₰ 7️⃣ ₰❥ـامــــج 🎗♥️ 👈 اكتب برنامج لحساب مربعات ومكعبات الاعداد الصحيحة المحصورة بين (۱ - ۲۰) بدون استخدام الدوال الجاهزة؟ على ان يكون الناتج كما في الشكل؟ ❥➺┊@programming_languages_IT_CS !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 #include<iostream> using namespace std; int main() {     cout << "Number\tSquare\tCube\n";     cout<<"_\t_\t_"<<endl;     for (int num = 1; num <= 20; num++) {         int square = num * num;         int cube = num * num * num;                 cout << num << "\t" << square << "\t" << cube << "\n";     }         return 0; } !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 ✍✍ محمد الحسيني ╭─┅═ঊঈ⚠ঊঈ═┅─╮ ☛    @alhussini_IT   ☚ ╰─┅═ঊঈ☠ঊঈ═┅─╯

♥️🎗بـــرنــ₰ 6️⃣ ₰❥ـامــــج 🎗♥️ 👈 اكتب  برنامج لايجاد الاعداد التي تقبل القسمه على العدد (٥) من بين الاعداد (۱) الى (۱۰۰)؟ ❥➺┊@programming_languages_IT_CS !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 #include <iostream> using namespace std; int main() {    cout << "Numbers divisible by 5 between 1 and 100:" << endl;    for (int i = 1; i <= 100; i++) {       if (i % 5 == 0) {          cout << i << " ";       }    }    return 0; } !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 ✍✍ محمد الحسيني ╭─┅═ঊঈ⚠ঊঈ═┅─╮ ☛    @alhussini_IT   ☚ ╰─┅═ঊঈ☠ঊঈ═┅─╯

♥️🎗بـــرنــ₰ 5️⃣ ₰❥ـامــــج 🎗♥️ 👈 اكتب برنامج لادخال  رقم الشهر ويقوم بطباعه اسم الشهر باستخدام جمله التحكم switch اكتب برنامج لايجاد الاعداد التي تقبل القسمه ❥➺┊@programming_languages_IT_CS↷ !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 #include <iostream> using namespace std; int main() { int month; cout << "Enter the month number (1-12): "; cin >> month; switch (month) { case 1: cout << "January" << endl; break; case 2: cout << "February" << endl; break; case 3: cout << "March" << endl; break; case 4: cout << "April" << endl; break; case 5: cout << "May" << endl; break; case 6: cout << "June" << endl; break; case 7: cout << "July" << endl; break; case 8: cout << "August" << endl; break; case 9: cout << "September" << endl; break; case 10: cout << "October" << endl; break; case 11: cout << "November" << endl; break; case 12: cout << "December" << endl; break; default: cout << "Invalid month number!" << endl; } return 0; } !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 ✍✍ محمد الحسيني ╭─┅═ঊঈ⚠ঊঈ═┅─╮ ☛    @alhussini_IT   ☚ ╰─┅═ঊঈ☠ঊঈ═┅─╯

♥️🎗بـــرنــ₰ 4️⃣ ₰❥ـامــــج 🎗♥️ 👈 اكتب برنامج  لادخال مجموعه من الاعداد عددها يحدده المستخدم ثم ايجاد مجموع هذه الاعداد وايجاد القيمه الاكبر والقيمه الاصغر من بين هذه الاعداد ؟ ❥➺┊@programming_languages_IT_CS !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 #include <iostream> using namespace std; int main() {    int n;    int sum = 0;    int max, min;    cout << "Enter the number of elements: ";    cin >> n;    int arr[n];    cout << "Enter the elements:" << endl;    for (int i = 0; i < n; i++) {       cout << "Element " << i+1 << ": ";       cin >> arr[i];       sum += arr[i];       if (i == 0) {          max = arr[i];          min = arr[i];       } else {          if (arr[i] > max) {             max = arr[i];          }          if (arr[i] < min) {             min = arr[i];          }       }    }    cout << "Sum of the elements: " << sum << endl;    cout << "Maximum value: " << max << endl;    cout << "Minimum value: " << min << endl;    return 0; } !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 ✍✍ محمد الحسيني ╭─┅═ঊঈ⚠ঊঈ═┅─╮ ☛    @alhussini_IT   ☚ ╰─┅═ঊঈ☠ঊঈ═┅─╯

♥️🎗بـــرنــ₰ 3️⃣ ₰❥ـامــــج 🎗♥️ 👈 اكتب برنامج لطباعه الحروف الابجدية من (A) الى (Z) ؟ باستخدام :- 1- for 2- while 3- do......while() ❥➺┊@programming_languages_IT_CS !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 ـــــــــــــــــــ❥باستخدام  ال for❥ـــــــــــــــــــ #include <iostream> using namespace std; int main() {    for (char ch = 'A'; ch <= 'Z'; ch++) {       cout << ch << " ";    }    return 0; } ـــــــــــــــــ❥باستخدام  ال while❥ــــــــــــــــ #include <iostream> using namespace std; int main() {    char ch = 'A';    while (ch <= 'Z') {       cout << ch << " "<<endl;       ch++;    }    return 0; } ـــــــــــ❥باستخدام  ال do.....while❥ــــــــــــ #include <iostream> using namespace std; int main() {    char ch = 'A';    do {       cout << ch << " ";       ch++;    } while (ch <= 'Z');    return 0; } !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 ✍✍ محمد الحسيني ╭─┅═ঊঈ⚠ঊঈ═┅─╮ ☛    @alhussini_IT   ☚ ╰─┅═ঊঈ☠ঊঈ═┅─╯

♥️🎗بـــرنــ₰ 2️⃣ ₰❥ـامــــج 🎗♥️ 👈 اكتب برنامج لطباعه العدد الكبير (Max) من بين ثلاثه اعداد ؟ ❥➺┊@programming_languages_IT_CS !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 #include <iostream> using namespace std; int main() {    int num1, num2, num3;    cout << "Enter the first number: ";    cin >> num1;    cout << "Enter the second number: ";    cin >> num2;    cout << "Enter the third number: ";    cin >> num3;    int max = num1;    if (num2 > max) {       max = num2;    }    if (num3 > max) {       max = num3;    }    cout << "The maximum number is: " << max << endl;    return 0; } !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 ✍✍ محمد الحسيني ╭─┅═ঊঈ⚠ঊঈ═┅─╮ ☛    @alhussini_IT   ☚ ╰─┅═ঊঈ☠ঊঈ═┅─╯

♥️🎗بـــرنــ₰ 2️⃣ ₰❥ـامــــج 🎗♥️ 👈 اكتب برنامج لطباعه الحروف الابجدية من (A) الى (Z) ؟ باستخدام :- 1- for 2- while 3- do......while() ❥➺┊@programming_languages_IT_CS !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 ـــــــــــــــــــ❥باستخدام  ال for❥ـــــــــــــــــــ #include <iostream> using namespace std; int main() {    for (char ch = 'A'; ch <= 'Z'; ch++) {       cout << ch << " ";    }    return 0; } ـــــــــــــــــــ❥باستخدام  ال while❥ـــــــــــــــــــ #include <iostream> using namespace std; int main() {    char ch = 'A';    while (ch <= 'Z') {       cout << ch << " "<<endl;       ch++;    }    return 0; } ـــــــــــــ❥باستخدام  ال do.....while❥ــــــــــــــ #include <iostream> using namespace std; int main() {    char ch = 'A';    do {       cout << ch << " ";       ch++;    } while (ch <= 'Z');    return 0; } !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 ✍✍ محمد الحسيني ╭─┅═ঊঈ⚠ঊঈ═┅─╮ ☛    @alhussini_IT   ☚ ╰─┅═ঊঈ☠ঊঈ═┅─╯

♥️🎗بـــرنــ₰ 1️⃣ ₰❥ـامــــج 🎗♥️ 👈 اكتب برنامج يقوم بجمع الاعداد المدخله من قبل المستخدم ومن ثم يتوقف عن العمل ويقوم بطباعتها مجرد ان يدخل المستخدم العدد صفر؟ باستخدام الاتي :- 1- for 2- while 3- do.....while ❥➺┊@programming_languages_IT_CS !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 ـــــــــــــــــــ❥باستخدام  ال for ❥ـــــــــــــــــــ #include <iostream> using namespace std; int main() {    int sum = 0, x =0, num;    cout << "------enter the num (0) if you want to print the sum------\n";       for (;;) {     x++;       cout << "enter the num"<<x << ":  ";       cin >> num;             sum += num;             if (num == 0) {          break;       }    }       cout << " The sum : " << sum << endl;       return 0; } ـــــــــــــــــــ❥باستخدام  ال while❥ـــــــــــــــــــ #include <iostream> using namespace std; int main() {    int sum = 0, x =0, num;    cout << "------enter the num (0) if you want to print the sum------\n";       while(true) {     x++;       cout << "enter the num"<<x << ":  ";       cin >> num;             sum += num;             if (num == 0) {          break;       }    }       cout << " The sum : " << sum << endl;       return 0; } ـــــــــــــ❥باستخدام  ال do.....while❥ــــــــــــــ #include <iostream> using namespace std; int main() {    int sum = 0, x =0, num;    cout << "------enter the num (0) if you want to print the sum------\n";       do {     x++;       cout << "enter the num"<<x << ":  ";       cin >> num;             sum += num;    }       while (num != 0);          cout << " The sum : " << sum << endl;       return 0; } !؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00 ✍✍ محمد الحسيني ╭─┅═ঊঈ⚠ঊঈ═┅─╮ ☛    @alhussini_IT   ☚ ╰─┅═ঊঈ☠ঊঈ═┅─╯