لغة ال++Cخطوة بخطوة
Open in Telegram
💻 الى المهندسين والمبرمجين ومحبي البرمجة والحاسوب 👈👈سوف يتم شرح لغه ال++C للمبتدئين حتى الاحتراف 👈👈 دورات مجانية 👈👈 مشاريع مفتوحة المصدر + اكواد 👈👈كتب برمجة وحاسوب #للسوال_او_الاستفسار @alhussini_IT
Show more3 443
Subscribers
No data24 hours
-37 days
-3530 days
Posts Archive
3 443
رفح تُباد أمام مرأى العالم .. والعالم مستمر في المشاهدة والصمت
ربنا المنتقم.
3 443
♥️🎗بـــرنــ₰6⃣2⃣₰❥ـامــــج 🎗♥️
👈 حل المعادلة
❥➺┊@programming_languages_IT_CS↷
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
#include<iostream.h>
using namespace std;
#include<cmath>
void f(int x)
{double result, b;
if(x>=0)
{
result=3-cos(2*x);
cout<<sqrt(result);
}
else
{
b=pow(x,1.0/8.0);
result=pow(x,1.0/5.0)-log10(b);
cout<<result;
}
}
int main()
{
int a;
cout<<"Enter the value x=";
cin>>a;
f(a);
}
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
✍✍ محمد الحسيني
╭─┅═ঊঈ⚠ঊঈ═┅─╮
☛ @alhussini_IT ☚
╰─┅═ঊঈ☠ঊঈ═┅─╯
انتهى..... ✋✋
3 443
🎀🎀♥️🎗 اعــــلان ♥️🎗🎀🎀
👈انتهينا اليوم من حل الاسئلة الذي رسلوها طلاب #جامعة_ذمار واعذرونا ع التأخير وكان ذلك بسبب الظغوطات التي عليا.
👈واي طلاب في اي جامعة او في اي دولة عندة اسئلة ويريدوا نحل لهم هذه اسئلة يرسلوهن خاص. 👇
╭─┅═ঊঈ⚠ঊঈ═┅─╮
☛ @alhussini_IT ☚
╰─┅═ঊঈ☠ঊঈ═┅─╯
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
✍✍ محمد الحسيني
3 443
♥️🎗بـــرنــ₰6⃣2⃣₰❥ـامــــج 🎗♥️
👈 حل المعادلة
❥➺┊@programming_languages_IT_CS↷
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
#include<iostream.h>
using namespace std;
#include<cmath>
void f(int x)
{double result, b;
if(x>=0)
{
result=3-cos(2*x);
cout<<sqrt(result);
}
else
{
b=pow(x,1.0/8.0);
result=pow(x,1.0/5.0)-log10(b);
cout<<result;
}
}
int main()
{
int a;
cout<<"Enter the value x=";
cin>>a;
f(a);
}
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
✍✍ محمد الحسيني
╭─┅═ঊঈ⚠ঊঈ═┅─╮
☛ @alhussini_IT ☚
╰─┅═ঊঈ☠ঊঈ═┅─╯
انتهى..... ✋✋
3 443
♥️🎗بـــرنــ₰ 5⃣2⃣₰❥ـامــــج 🎗♥️
👈 اذا علمت أن مركز حساب نسبة التلوث يقوم بأخذ ثلاث قراءات كل قراءة من 0 100to ثم يحدد
نسبة التلوث بناءاً على المعدل العام للثلاث قراءات..
safety 0 to 30 آمن
medium 31 to 60 متوسط
dangerous 61 to 100 خطير
المطلوب كتابة برنامج قابل للتنفيذ مع اضافة أنه يجب طباعة القيمة الأعلى في نسبة التلوث ؟
❥➺┊@programming_languages_IT_CS↷
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
#include <iostream>
using namespace std;
int main() {
int reading1, reading2, reading3;
double average;
string pollutionLevel;
cout << "Enter first reading (0-100): ";
cin >> reading1;
cout << "Enter second reading (0-100): ";
cin >> reading2;
cout << "Enter third reading (0-100): ";
cin >> reading3;
average = (reading1 + reading2 + reading3) / 3;
if (average >= 0 && average <= 30) {
pollutionLevel = "safe";
} else if (average >=31&& average <= 60) {
pollutionLevel = "medium";
} else {
pollutionLevel = "dangerous";
}
cout << "Highest value: " << max({reading1, reading2, reading3}) << endl;
cout << "Pollution level: " << pollutionLevel << endl;
return 0;
}
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
✍✍ محمد الحسيني
╭─┅═ঊঈ⚠ঊঈ═┅─╮
☛ @alhussini_IT ☚
╰─┅═ঊঈ☠ঊঈ═┅─╯
انتهى..... ✋✋
3 443
♥️🎗بـــرنــ₰ 5⃣2⃣₰❥ـامــــج 🎗♥️
👈 اذا علمت أن مركز حساب نسبة التلوث يقوم بأخذ ثلاث قراءات كل قراءة من 0 100to ثم يحدد
نسبة التلوث بناءاً على المعدل العام للثلاث قراءات..
safety 0 to 30 آمن
medium 31 to 60 متوسط
dangerous 61 to 100 خطير
المطلوب كتابة برنامج قابل للتنفيذ مع اضافة أنه يجب طباعة القيمة الأعلى في نسبة التلوث ؟
❥➺┊@programming_languages_IT_CS↷
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
#include <iostream>
using namespace std;
int main() {
int reading1, reading2, reading3;
double average;
string pollutionLevel;
cout << "Enter first reading (0-100): ";
cin >> reading1;
cout << "Enter second reading (0-100): ";
cin >> reading2;
cout << "Enter third reading (0-100): ";
cin >> reading3;
average = (reading1 + reading2 + reading3) / 3;
if (average >= 0 && average <= 30) {
pollutionLevel = "safe";
} else if (average >=31&& average <= 60) {
pollutionLevel = "medium";
} else {
pollutionLevel = "dangerous";
}
cout << "Highest value: " << max({reading1, reading2, reading3}) << endl;
cout << "Pollution level: " << pollutionLevel << endl;
return 0;
}
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
✍✍ محمد الحسيني
╭─┅═ঊঈ⚠ঊঈ═┅─╮
☛ @alhussini_IT ☚
╰─┅═ঊঈ☠ঊঈ═┅─╯
انتهى..... ✋✋
3 443
♥️🎗بـــرنــ₰4⃣2⃣₰❥ـامــــج 🎗♥️
👈 تعطي شركة خصماً على المبيعات تبعاً لعدد الوحدات المباعة على النحو:
. %10 في حالة عدد الوحدات المباعة أكثر من 1000 وحدة.
. %5 في حالة عدد الوحدات المباعة أكثر من 500 وحدة.
لا يوجد خصم إذا كان عدد الوحدات المباعة 500 أو اقل.
افترض سعر للسلعة المباعة ثم قم بحساب الصافي.)
❥➺┊@programming_languages_IT_CS↷
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
#include <iostream>
using namespace std;
int main() {
int unitsSold;
double pricePerUnit, discount, totalSales, netSales;
cout << "Enter the number of units sold: ";
cin >> unitsSold;
cout << "Enter the price per unit: $";
cin >> pricePerUnit;
if (unitsSold > 1000) {
discount = 0.1;
} else if (unitsSold > 500) {
discount = 0.05;
} else {
discount = 0;
}
totalSales = unitsSold * pricePerUnit;
netSales = totalSales - (totalSales * discount);
cout << "Total sales: $" << totalSales << endl;
cout << "Discount: " << (discount * 100) << "%" << endl;
cout << "Net sales after discount: $" << netSales << endl;
return 0;
}
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
✍✍ محمد الحسيني
╭─┅═ঊঈ⚠ঊঈ═┅─╮
☛ @alhussini_IT ☚
╰─┅═ঊঈ☠ঊঈ═┅─╯
انتهى..... ✋✋
3 443
♥️🎗بـــرنــ₰🔮3⃣2⃣₰❥ـامــــج 🎗♥️
👈 اكتب برنامج يقوم بتقسيم العدد المدخل من قبل المستخدم إلى خانات منفصله مثلا (100) يقوم بتقسيمها
0 0 1 باستخدام الاستدعاء الذاتي ؟
❥➺┊@programming_languages_IT_CS↷
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
#include <iostream>
using namespace std;
void divideNumber(int number) {
if (number == 0) {
return;
} else {
divideNumber(number / 10);
cout << number % 10 << " ";
}
}
int main() {
int number;
cout << "Enter a number: ";
cin >> number;
cout << "The number divided into separate digits is: ";
divideNumber(number);
cout << endl;
return 0;
}
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
✍✍ محمد الحسيني
╭─┅═ঊঈ⚠ঊঈ═┅─╮
☛ @alhussini_IT ☚
╰─┅═ঊঈ☠ঊঈ═┅─╯
انتهى..... ✋✋
3 443
♥️🎗بـــرنــ₰2⃣2⃣₰❥ـامــــج 🎗♥️
👈 اكتب برنامج بلغه يحسب مجموع الاعداد بين عددين مدخلين من قبل المستخدم باستخدام الاستدعاء الذاتي ؟
❥➺┊@programming_languages_IT_CS↷
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
#include <iostream>
using namespace std;
int sumNumbers(int start, int end) {
if (start > end) {
return 0;
} else {
return start + sumNumbers(start + 1, end);
}
}
int main() {
int start, end;
cout << "Enter the starting number: ";
cin >> start;
cout << "Enter the ending number: ";
cin >> end;
int result = sumNumbers(start, end);
cout << "The sum of numbers between " << start << " and " << end << " is: " << result << endl;
return 0;
}
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
✍✍ محمد الحسيني
╭─┅═ঊঈ⚠ঊঈ═┅─╮
☛ @alhussini_IT ☚
╰─┅═ঊঈ☠ঊঈ═┅─╯
انتهى..... ✋✋
3 443
♥️🎗بـــرنــ₰1⃣2⃣₰❥ـامــــج 🎗♥️
👈 اكتب برنامج لقراءة عدد ثم اوجد مجموع أرقامه والرقم الاكبر بين أرقامه ؟
❥➺┊@programming_languages_IT_CS↷
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
#include <iostream>
using namespace std;
int main()
{
int num, sum = 0, max = 0, digit;
cout << "Enter a number: ";
cin >> num;
while(num != 0)
{
digit = num % 10;
sum += digit;
if(digit > max)
{
max = digit;
}
num /= 10;
}
cout << "The sum of the digits is: " << sum << endl;
cout << "The largest digit is: " << max << endl;
return 0;
}
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
✍✍ محمد الحسيني
╭─┅═ঊঈ⚠ঊঈ═┅─╮
☛ @alhussini_IT ☚
╰─┅═ঊঈ☠ঊঈ═┅─╯
انتهى..... ✋✋
3 443
♥️🎗بـــرنــ₰ 0⃣2⃣₰❥ـامــــج 🎗♥️
👈 اكتب برنامج لقراءة ثلاث اعداد من النوع الصحيح ثم رتب هذه الاعداد تصاعدياً باستخدام الدوال ؟
❥➺┊@programming_languages_IT_CS↷
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
#include <iostream>
using namespace std;
void swap(int& a, int& b) {
int temp = a;
a = b;
b = temp;
}
void sortNumbers(int& num1, int& num2, int& num3) {
if (num1 > num2) {
swap(num1, num2);
}
if (num2 > num3) {
swap(num2, num3);
}
if (num1 > num2) {
swap(num1, num2);
}
}
int main() {
int num1, num2, num3;
cout << "Enter the num 1: ";
cin >> num1;
cout << "Enter the num 2: ";
cin>> num2 ;
cout << "Enter the num 3: ";
cin>> num3;
sortNumbers(num1, num2, num3);
cout << "Sorted numbers: " << num1 << " " << num2 << " " << num3 << endl;
return 0;
}
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
✍✍ محمد الحسيني
╭─┅═ঊঈ⚠ঊঈ═┅─╮
☛ @alhussini_IT ☚
╰─┅═ঊঈ☠ঊঈ═┅─╯
انتهى... ✋✋
3 443
🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴
عادشي واحد يشتي نطبع له الحرف يرسله اخر مهله لا الساعه 10 وبعدا خلاص عنحل السوال ذي بعدة
3 443
🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴
عادشي واحد يشتي نطبع له الحرف يرسله اخر مهله لاعصر وبعدا خلاص عنحل السوال ذي بعدة
3 443
🛑خامس شكل حرف الـ H 👇🛑
#include <iostream>
using namespace std;
int main(){
for(int i=0; i<=8; i++){
cout<<endl;
for(int j=0; j<8; j++)
if(j==0 || j==7 || i+4==8)
cout<<"*";
else cout<<" ";
}
return 0;
}
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
✍✍ محمد الحسيني
╭─┅═ঊঈ⚠ঊঈ═┅─╮
☛ @alhussini_IT ☚
╰─┅═ঊঈ☠ঊঈ═┅─╯
يتبع... 👇👇
3 443
🛑خامس شكل حرف الـ H 👇🛑
#include <iostream>
using namespace std;
int main(){
for(int i=0; i<=8; i++){
cout<<endl;
for(int j=0; j<8; j++)
if(j==0 j==7 i+4==8)
cout<<"*";
else cout<<" ";
}
return 0;
}
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
✍✍ محمد الحسيني
╭─┅═ঊঈ⚠ঊঈ═┅─╮
☛ @alhussini_IT ☚
╰─┅═ঊঈ☠ঊঈ═┅─╯
يتبع... 👇👇
3 443
🛑رابع شكل حرف الـ B 👇🛑
#include<iostream>
using namespace std;
int main() {
for(int i=0; i<7; i++) {
for(int j=0; j<7; j++) {
if(j == 0 || (i == 0 || i == 3 || i == 6) && (j < 6 && j > 0) || j == 6 && (i > 0 && i < 3) || i == j-1 && (i > 3))
cout<<"*";
else
cout<<" ";
}
cout<<"\n";
}
return 0;
}
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
✍✍ محمد الحسيني
╭─┅═ঊঈ⚠ঊঈ═┅─╮
☛ @alhussini_IT ☚
╰─┅═ঊঈ☠ঊঈ═┅─╯
يتبع... 👇👇
3 443
🛑ثالث شكل حرف ال A🛑
🅰🅰🅰🅰🅰🅰🅰
❥➺┊@programming_languages_IT_CS↷
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
3 443
🛑ثاني شكل حرف الـ N 👇🛑
#include <iostream>
using namespace std;
int main(){
for(int i=0 ; i<=10; i++){
for(int j=0 ;j<=10 ; j++){
if(j==0 || j==10 ||(j-i==0 && j<=9))
cout<<"*";
else
cout<<" ";}
cout<<endl;
}
return 0;
}
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
✍✍ محمد الحسيني
╭─┅═ঊঈ⚠ঊঈ═┅─╮
☛ @alhussini_IT ☚
╰─┅═ঊঈ☠ঊঈ═┅─╯
يتبع... 👇👇
3 443
🛑ثاني شكل حرف ال A🛑
🅰🅰🅰🅰🅰🅰🅰
❥➺┊@programming_languages_IT_CS↷
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
3 443
🛑اول شكل حرف ال R🛑
❥➺┊@programming_languages_IT_CS↷
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
