نصائح و استشارات برمجية
1.44K subscribers
546 photos
10 videos
83 files
398 links
• نصائح واستشارات برمجية متعلقة باسئلة تم طرحها

• لطرح استفسار او سؤال: @m4md24
Download Telegram
نصائح و استشارات برمجية
ابغى اتعلم اصمم مواقع ويب من وين ابدا
• اتعلم:
- HTML
- CSS
- JavaScript
- SQL
- PHP

• بعدها تنتقل لشئ اسمه "بيئة عمل" framework :
- و لما توصل للنقطة دي هتقوم بعملية بحث عن انواع بيئات العمل و تشوف اكتر واحد عجبك بينهم و تستكمل طريقك 🤝🏻

• بخصوص المصادر تقدر تبحث في:

- جوجل او اي محرك بحث عن مستندات او كتب حسب كل لغة.

- او تسمع شرح في اليوتيوب او اي منصة فيها دورات تعليمية حسب كل لغة.
This media is not supported in your browser
VIEW IN TELEGRAM
سلام ممكن حد يراجع الحل
تحويل من Hexadecimal
الىDecimal

12A4= 4772
_________

الطريقة
4=4×16قوّة 0 = 4
_________
A×16قوة واحد
10×16=160
_________
2×16 قوة اثنين =
2×256=512

_________
1×16 قوة ثلاثة
1×4,096= 4096


نجمع النواتج
4+160+512+4096= 4772
This media is not supported in your browser
VIEW IN TELEGRAM
السلام عليكم

ماهو أفضل هارد خارجي
This media is not supported in your browser
VIEW IN TELEGRAM
ضرب مصفوفتين ?!

كود تحويل infix to prefix
- وكود حساب قيمة العملية prefix
هاالبرامج ولاعرفت كيف احلهم بواجه صعوبه فيهم رغم الفهم
نصائح و استشارات برمجية
كود تحويل infix to prefix
#include <iostream>
#include <stack>
#include <algorithm>

using namespace std;

bool isOperator(char c) {
return (c == '+' || c == '-' || c == '*' || c == '/');
}

int getPrecedence(char op) {
if (op == '+' || op == '-') {
return 1;
} else if (op == '*' || op == '/') {
return 2;
}
return 0;
}

string infixToPrefix(string infix) {
stack<char> operators;
stack<string> operands;

reverse(infix.begin(), infix.end());

for (char& c : infix) {
if (isalnum(c)) {
operands.push(string(1, c));
} else if (c == ')') {
operators.push(c);
} else if (c == '(') {
while (!operators.empty() && operators.top() != ')') {
string operand1 = operands.top();
operands.pop();
string operand2 = operands.top();
operands.pop();
char op = operators.top();
operators.pop();
operands.push(op + operand2 + operand1);
}
operators.pop();
} else if (isOperator(c)) {
while (!operators.empty() && getPrecedence(operators.top()) >= getPrecedence(c)) {
string operand1 = operands.top();
operands.pop();
string operand2 = operands.top();
operands.pop();
char op = operators.top();
operators.pop();
operands.push(op + operand2 + operand1);
}
operators.push(c);
}
}

while (!operators.empty()) {
string operand1 = operands.top();
operands.pop();
string operand2 = operands.top();
operands.pop();
char op = operators.top();
operators.pop();
operands.push(op + operand2 + operand1);
}

return operands.top();
}

int evaluatePrefix(string prefix) {
stack<int> s;

reverse(prefix.begin(), prefix.end());

for (char& c : prefix) {
if (isdigit(c)) {
s.push(c - '0');
} else {
int operand1 = s.top();
s.pop();
int operand2 = s.top();
s.pop();

switch (c) {
case '+':
s.push(operand1 + operand2);
break;
case '-':
s.push(operand1 - operand2);
break;
case '*':
s.push(operand1 * operand2);
break;
case '/':
s.push(operand1 / operand2);
break;
}
}
}

return s.top();
}

int main() {
string infixExpression;
cout << "Enter infix expression: ";
cin >> infixExpression;

string prefixExpression = infixToPrefix(infixExpression);
cout << "Prefix expression: " << prefixExpression << endl;

int result = evaluatePrefix(prefixExpression);
cout << "Result: " << result << endl;

return 0;
}
This media is not supported in your browser
VIEW IN TELEGRAM
اخى عند سؤال بتكتب ايه علشان الكود يلون عشان عندى مش ظابطه، بلغة سي بلس بلس
This media is not supported in your browser
VIEW IN TELEGRAM
انا تقريبا خلصتها ولكن المطلوب هو إضافة افكار جديدة الى هذه الآلة الحاسبة
نصائح و استشارات برمجية
Photo
بكل بساطة تقدري تشوفي افكار جديدة من الآلات الحاسبة المتقدمة في عصرنا الحالي و طبعا في انواع كتيرة، زي ما في الصور