السلام عليكم
لو حد عارف الفرق بين المتغير المحلي والغير محلي في لغة كوتلن ياريت يوضح
لو حد عارف الفرق بين المتغير المحلي والغير محلي في لغة كوتلن ياريت يوضح
نصائح و استشارات برمجية
السلام عليكم لو حد عارف الفرق بين المتغير المحلي والغير محلي في لغة كوتلن ياريت يوضح
• و عليكم السلام و رحمة الله و بركاته
• شوف المقال البسيط دا ↓
chat.openai.com/share/0f995180-b8e3-48c5-8bf1-8fba6255d9b5
• شوف المقال البسيط دا ↓
chat.openai.com/share/0f995180-b8e3-48c5-8bf1-8fba6255d9b5
طيب انا حاليا خلصت basic of kotlin وماشي حاليا في ال OOP هل في مواقع بتقدم افكار ممكن نقدمها او أي طريقه عموما اتدرب بيها على الحاجات اللي بتعلمها ؟
Forwarded from نصائح و استشارات برمجية
●هتلاقي عند اسماء المواقع دي مسائل تقدر ان شاء الله تحلها ⬇️💚:
• Codeforces
• LeetCode
• HackerRank
• TopCoder
• AtCoder
• HackerEarth
• Codewars
• Codeforces
• LeetCode
• HackerRank
• TopCoder
• AtCoder
• HackerEarth
• Codewars
لوسمحت عطني كود برنامج يقوم بإدخال عددين وطباعه العامل المشترك الاكبر
نصائح و استشارات برمجية
لوسمحت عطني كود برنامج يقوم بإدخال عددين وطباعه العامل المشترك الاكبر
#include <iostream>
using namespace std;
int main() {
int num1, num2;
cout << "Enter first number: ";
cin >> num1;
cout << "Enter second number: ";
cin >> num2;
int gcd = 1;
for (int i = 1; i <= num1 && i <= num2; i++) {
if (num1 % i == 0 && num2 % i == 0) {
gcd = i;
}
}
cout << "Greatest Common Divisor: " << gcd << endl;
return 0;
}
نصائح و استشارات برمجية
+برنامج يقوم بإدخال عددين وطباعه المضاعف المشترك الأصغر
#include <iostream>
using namespace std;
int main() {
int num1, num2;
cout << "Enter first number: ";
cin >> num1;
cout << "Enter second number: ";
cin >> num2;
int lcm = (num1 > num2) ? num1 : num2;
while (true) {
if (lcm % num1 == 0 && lcm % num2 == 0) {
cout << "Least Common Multiple: " << lcm << endl;
break;
}
lcm++;
}
return 0;
}
#include <iostream>
using namespace std;
struct pool{
int data;
pool*next;
};
pool*head=NULL;
void insertion(int value)
{
pool*first,*last;
first=new pool;
first->data=value;
if(head==NULL){head=first;first->next=NULL;}
else{
head=last;
while(last->next!=NULL)
{
last=last->next;
}
last->next=first;
first->next=NULL;
}
void display(){
pool*cptr;
if(head==NULL)
{
cout<<"linked list is empty . ";
}
else{
cptr=head;
while(cptr!=NULL)
{
cout<<cptr->data<<"\t\n\t";
cptr=cptr->next;
}
}
}
}
int main()
{
insertion(10);
insertion(20);
insertion(30);
insertion(40);
insertion(50);
display();
return 0 ;
}
using namespace std;
struct pool{
int data;
pool*next;
};
pool*head=NULL;
void insertion(int value)
{
pool*first,*last;
first=new pool;
first->data=value;
if(head==NULL){head=first;first->next=NULL;}
else{
head=last;
while(last->next!=NULL)
{
last=last->next;
}
last->next=first;
first->next=NULL;
}
void display(){
pool*cptr;
if(head==NULL)
{
cout<<"linked list is empty . ";
}
else{
cptr=head;
while(cptr!=NULL)
{
cout<<cptr->data<<"\t\n\t";
cptr=cptr->next;
}
}
}
}
int main()
{
insertion(10);
insertion(20);
insertion(30);
insertion(40);
insertion(50);
display();
return 0 ;
}
نصائح و استشارات برمجية
#include <iostream> using namespace std; struct pool{ int data; pool*next; }; pool*head=NULL; void insertion(int value) { pool*first,*last; first=new pool; first->data=value; if(head==NULL){head=first;first->next=NULL;} else{ head=last;…
• دا التصحيح ↓
#include <iostream>
using namespace std;
struct pool {
int data;
pool *next;
};
pool *head = NULL;
void insertion(int value) {
pool *first, *last;
first = new pool;
first->data = value;
if (head == NULL) {
head = first;
first->next = NULL;
} else {
last = head;
while (last->next != NULL) {
last = last->next;
}
last->next = first;
first->next = NULL;
}
}
void display() {
pool *cptr;
if (head == NULL) {
cout << "linked list is empty . ";
} else {
cptr = head;
while (cptr != NULL) {
cout << cptr->data << "\n";
cptr = cptr->next;
}
}
}
int main() {
insertion(10);
insertion(20);
insertion(30);
insertion(40);
insertion(50);
display();
return 0;
}
نصائح و استشارات برمجية
ده عملتوه وطلع غلط
مينفعش يكون في مسافات بين كل كلمة في اسم المتغير، و يفضل انك تةخديها قاعدة في البرمجة تجنباً للاخطاء
سطر ٧ و ٨ و ٩ و ١٠ و ١١ و ١٢
سطر ٧ و ٨ و ٩ و ١٠ و ١١ و ١٢