تنبيه‼️
بكرة كل طالب يجيب معه المحاضرة المطبوعة حق التبان لان الاستاذ بايشرح لنا منها
بكرة كل طالب يجيب معه المحاضرة المطبوعة حق التبان لان الاستاذ بايشرح لنا منها
السلام عليكم..
بالنسبة لتظلمات مادة الثقافة
الوطنية 2 تم اضافة 10 درجات لكل طالب
كان المفروض تكون الإضافة للترمين حسب ما كلمني د خالد مسبقا..
لكن وبعد انعقاد مجلس الكلية كان القرار فقط 10 درجات مراعاة لسمعة الكلية في حال تم اضافة اكثر من 10 درجات لكل طالب..
بالنسبة لتظلمات مادة الثقافة
الوطنية 2 تم اضافة 10 درجات لكل طالب
كان المفروض تكون الإضافة للترمين حسب ما كلمني د خالد مسبقا..
لكن وبعد انعقاد مجلس الكلية كان القرار فقط 10 درجات مراعاة لسمعة الكلية في حال تم اضافة اكثر من 10 درجات لكل طالب..
Information Technology "IT" - level 4
sql.code.play_20.apk
برنامج sql اندرويد
برنامج حلو جدا لتطبيق اكواد قواعد البيانات في التلفون
برنامج حلو جدا لتطبيق اكواد قواعد البيانات في التلفون
كود محاضرة الًيَوُمًِ هياكل بيانات عملي prefix
#include<iostream>
#include<string>
using namespace std;
struct stack
{
int top;
char item[100];
}stk;
string post,pre;
void push(stack & s, char ch)
{
if (s.top == 99)
return;
else
{
s.top++;
s.item[s.top] = ch;
}
}
void pop(stack &s)
{
if (s.top == -1)
return;
else
s.top--;
}
char top(stack s)
{
return s.item[s.top];
}
int isOpreator(char ch)
{
if (ch == '^' || ch == '*' || ch == '/' || ch == '+' || ch == '-')
return 1;
else
return 0;
}
int precdence(char ch)
{
if (ch == '^')
return 3;
else if (ch == '*' || ch == '/')
return 2;
else if (ch == '+' || ch == '-')
return 1;
else
return 0;
}
void reverse(string &exp)
{
int len = exp.length();
char temp;
for (int i = 0; i < len / 2; i++)
{
temp = exp[i];
exp[i] = exp[len - i - 1];
exp[len - i - 1] = temp;
}
}
void postfix(string exp)
{
for (int i = 0; i < exp.length(); i++)
{
if (exp[i] == '(')
push(stk, exp[i]);
else if (exp[i] >= 'A'&&exp[i] <= 'Z' || exp[i] >= 'a'&&exp[i] <= 'z')
post += exp[i];
else if (isOpreator(exp[i]))
{
char temp = top(stk);
while (isOpreator(temp) && precdence(temp) >= precdence(exp[i]))
{
post += top(stk);
pop(stk);
temp = top(stk);
}
push(stk, exp[i]);
}
else if (exp[i] == ')')
{
char temp = top(stk);
while (temp != '(')
{
post += temp;
pop(stk);
temp = top(stk);
}
pop(stk);
}
}
while (stk.top > -1)
{
post += top(stk);
pop(stk);
}
}
void prefix(string exp)
{
reverse(exp);
for (int i = 0; i < exp.length(); i++)
{
if (exp[i] == ')')
push(stk, exp[i]);
else if (exp[i] >= 'A'&&exp[i] <= 'Z' || exp[i] >= 'a'&&exp[i] <= 'z')
pre += exp[i];
else if (isOpreator(exp[i]))
{
char temp = top(stk);
while (isOpreator(temp) && precdence(temp) > precdence(exp[i]))
{
pre += top(stk);
pop(stk);
temp = top(stk);
}
push(stk, exp[i]);
}
else if (exp[i] == '(')
{
char temp = top(stk);
while (temp != ')')
{
pre += temp;
pop(stk);
temp = top(stk);
}
pop(stk);
}
}
while (stk.top > -1)
{
pre += top(stk);
pop(stk);
}
reverse(pre);
}
int main()
{
stk.top = -1;
string exp= "(a*b+c)";
postfix(exp);
cout << post << "\n";
prefix(exp);
cout<< pre<<"\n";
return 0;}
#include<iostream>
#include<string>
using namespace std;
struct stack
{
int top;
char item[100];
}stk;
string post,pre;
void push(stack & s, char ch)
{
if (s.top == 99)
return;
else
{
s.top++;
s.item[s.top] = ch;
}
}
void pop(stack &s)
{
if (s.top == -1)
return;
else
s.top--;
}
char top(stack s)
{
return s.item[s.top];
}
int isOpreator(char ch)
{
if (ch == '^' || ch == '*' || ch == '/' || ch == '+' || ch == '-')
return 1;
else
return 0;
}
int precdence(char ch)
{
if (ch == '^')
return 3;
else if (ch == '*' || ch == '/')
return 2;
else if (ch == '+' || ch == '-')
return 1;
else
return 0;
}
void reverse(string &exp)
{
int len = exp.length();
char temp;
for (int i = 0; i < len / 2; i++)
{
temp = exp[i];
exp[i] = exp[len - i - 1];
exp[len - i - 1] = temp;
}
}
void postfix(string exp)
{
for (int i = 0; i < exp.length(); i++)
{
if (exp[i] == '(')
push(stk, exp[i]);
else if (exp[i] >= 'A'&&exp[i] <= 'Z' || exp[i] >= 'a'&&exp[i] <= 'z')
post += exp[i];
else if (isOpreator(exp[i]))
{
char temp = top(stk);
while (isOpreator(temp) && precdence(temp) >= precdence(exp[i]))
{
post += top(stk);
pop(stk);
temp = top(stk);
}
push(stk, exp[i]);
}
else if (exp[i] == ')')
{
char temp = top(stk);
while (temp != '(')
{
post += temp;
pop(stk);
temp = top(stk);
}
pop(stk);
}
}
while (stk.top > -1)
{
post += top(stk);
pop(stk);
}
}
void prefix(string exp)
{
reverse(exp);
for (int i = 0; i < exp.length(); i++)
{
if (exp[i] == ')')
push(stk, exp[i]);
else if (exp[i] >= 'A'&&exp[i] <= 'Z' || exp[i] >= 'a'&&exp[i] <= 'z')
pre += exp[i];
else if (isOpreator(exp[i]))
{
char temp = top(stk);
while (isOpreator(temp) && precdence(temp) > precdence(exp[i]))
{
pre += top(stk);
pop(stk);
temp = top(stk);
}
push(stk, exp[i]);
}
else if (exp[i] == '(')
{
char temp = top(stk);
while (temp != ')')
{
pre += temp;
pop(stk);
temp = top(stk);
}
pop(stk);
}
}
while (stk.top > -1)
{
pre += top(stk);
pop(stk);
}
reverse(pre);
}
int main()
{
stk.top = -1;
string exp= "(a*b+c)";
postfix(exp);
cout << post << "\n";
prefix(exp);
cout<< pre<<"\n";
return 0;}