لغة ال++Cخطوة بخطوة
Відкрити в Telegram
💻 الى المهندسين والمبرمجين ومحبي البرمجة والحاسوب 👈👈سوف يتم شرح لغه ال++C للمبتدئين حتى الاحتراف 👈👈 دورات مجانية 👈👈 مشاريع مفتوحة المصدر + اكواد 👈👈كتب برمجة وحاسوب #للسوال_او_الاستفسار @alhussini_IT
Показати більше3 443
Підписники
Немає даних24 години
-37 днів
-3530 днів
Архів дописів
3 443
بـــرنــــامــــج₰💻💻₰❥
نظام لتسجيل بيانات الطلاب :
#include <iostream>
#include <string.h>
using namespace std;
struct date {
int day ;
int month ;
int year ;
};
struct students {
int num ;
char name [20] ;
int age ;
string address ;
double phone ;
date birthdate ;
};
int main ( ){
int n ;
cout <<"please enter students number :\n" ;
cin >>n ;
students stud [n];
for (int i =0 ; i <n; i++){
stud [i].num =i ;
cout <<"student number :"<<i +1 <<endl ;
cout <<"------------------------------------\n\n";
cout <<"name :";
cin >>stud [i].name ;
cout <<"Age :";
cin >>stud [i].age ;
cout <<"Address:";
cin >>stud [i].address ;
cout <<"Phone :";
cin >>stud [i].phone ;
cout <<"Birth day :";
cin >>stud [i].birthdate.day ;
cout <<"Birth month :";
cin >>stud [i].birthdate.month ;
cout <<"Birth yeat :";
cin >>stud [i].birthdate.year;
system("cls"); }
cout <<"\n\nNum\tName\tAge\tAddress\tPhone\tBirthdata\n";
cout <<"----------------------------------------------\n";
for (int i =0 ; i <n ; i ++){
cout <<i +1 <<"\t";
cout <<stud [i].name <<"\t";
cout <<stud [i].age <<"\t";
cout <<stud [i].address <<"\t";
cout <<stud [i].phone <<"\t";
cout <<stud [i].birthdate.day <<"/";
cout <<stud [i].birthdate.month<<"/";
cout <<stud [i].birthdate.year <<"\n";
}}
المخـ₰💻₰❥ـرجات
Num Name Age Address Phone Birthdate ----------------------------------------------
1 Hamza 22 Sana'a 369 3/6/1998
2 Arkan 20 Aden 963 1/1/2000
[Program finished]
!؟ ـــــہہـ٨ــ♥ــــــ❥ــہہـــــــــــــــ❥ــہہ00:00:00
✍✍ محمد الحسيني
╭─┅═ঊঈ⚠ঊঈ═┅─╮
☛ @alhussini_IT ☚
╰─┅═ঊঈ☠ঊঈ═┅─╯
15 лют 2023, 15:26
3 443
بـــرنــــامــــج₰💻💻₰❥
#include <iostream>
using namespace std;
void swap (int *p , int *q ){
int temp = *p ;
*p = *q ;
*q = temp ; }
int main ( ){
int x =10, y =20 ;
swap (&x , &y);
cout <<x <<" "<<y ; }
المخـ₰💻₰❥ـرجات
20 10
[Program finished]
↷الكود المرافق ↷
بـــرنــــامــــج₰💻💻₰❥
#include <iostream>
using namespace std;
void swap (int &p , int &q ){
int temp = p ;
p = q ;
q = temp ; }
int main ( ){
int x =10, y =20 ;
swap (x , y);
cout <<x <<" "<<y ; }
!؟ ـــــہہـ٨ــ♥ــــــ❥ــہہـــــــــــــــ❥ــہہ00:00:00
✍✍ محمد الحسيني
╭─┅═ঊঈ⚠ঊঈ═┅─╮
☛ @alhussini_IT ☚
╰─┅═ঊঈ☠ঊঈ═┅─╯
13 лют 2023, 18:20
3 443
بـــرنــــامــــج₰💻💻₰❥
1⃣ لإدخال عناصر المصفوفة باستخدام المؤشرات ؟؟
2⃣ ادخال سلسلة نصية عن طريق المؤشرات ؟؟
#include <iostream>
using namespace std;
int main() {
int array[10];
int *p =array;
char string [30], *ch=string;
for (int i =0 ; i <10 ; i++){
cout <<"enter the number "<<i <<":\n";
cin >>*(p+i); }
cout <<"\n____\n";
for (int i =0 ; i <10 ; i++)
cout <<*(p+i)<<"\t";
cout <<"\n____\n";
cout <<"enter the name :";
cin.getline (ch, 30, '.');
cout <<"\n____\n";
cout <<"the name :"<<string;
cout <<endl;
return 0;
}
المخـ₰💻₰❥ـرجات
enter the number 0: 1
enter the number 1: 2 enter the number 2: 3 enter the number 3: 4 enter the number 4: 5 enter the number 5: 6 enter the number 6: 7 enter the number 7: 8 enter the number 8: 9 enter the number 9: 0 ____
1 2 3 4 5 6 7 8 0
____
enter the name :Allah Raby.
____
the name :
Allah Raby
[Program finished]
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
•┈┈┈•❈••✦✾✦••❈•┈┈┈•
C# Language ➺┊
@programming_languag
C++ Language ➺┊
@programming_languages_IT_CS
Web Language ➺┊
@Web_Programming_Design
•┈┈┈•❈••✦✾✦••❈•┈┈┈•
13 лют 2023, 18:18
3 443
بـــرنــــامــــج₰💻💻₰❥
1⃣ لإدخال بينات خمسة طلاب
(الاسم _ العمر _معدل الثانوية )
باستخدام التراكيب ؟؟
2⃣ طباعة بيانات الطالب الحاصل على اعلى معدل ؟؟
#include <iostream>
#include <string.h>
using namespace std;
struct student {
char name [30];
int age ;
float avrage; };
int main() {
student stude [5];
float max ;
int n =0;
for (int i =0 ; i <5 ; i++){
cout <<"enter the data student :"<<i+1<<"\n";
cout <<"----------------------\n";
cout <<"enter the name :";
cin .getline (stude [i].name, 30, '.' );
cout <<"enter the age :";
cin >>stude [i].age;
cout <<"enter the avrage :";
cin >>stude [i].avrage;
cout <<"\n____\n"; }
max =stude[0].avrage;
for (int i =0 ; i <5 ; i++)
if (stude[i].avrage >max)
{
cout <<"\n_-_-_-_-_-_-_-_-_-_-_-\n";
max = stude [i].avrage;
n =i ;
}
cout <<"\n____\n";
cout <<"this student have hight degree\n";
cout <<"name is:"<<stude[n].name<<endl;
cout <<"age is :"<<stude[n].age <<endl;
cout <<"the degree :"<<stude[n].avrage <<endl;
return 0;
}
المخـ₰💻₰❥ـرجات
enter the data student :1
---------------------- enter the name :Ahmmed . enter the age :20 enter the avrage :70 ____
enter the data student :2 ---------------------- enter the name :Mohammed . enter the age :22 enter the avrage :86
____
enter the data student :3
----------------------
enter the name :Hamza .
enter the age :23
enter the avrage :83
____
enter the data student :4
----------------------
enter the name :Arkan .
enter the age :25
enter the avrage :88
____
enter the data student :5
----------------------
enter the name :Ali .
enter the age :28
enter the avrage :77
____
_-_-_-_-_-_-_-_-_-_-_-
_-_-_-_-_-_-_-_-_-_-_-
____
this student have hight degree
name is:
Arkan
age is :25
the degree :88
[Program finished]
!؟ ـــــہہـ٨ــ♥ــــــ❥ــہہـــــــــــــــ❥ــہہ00:00:00
✍✍ محمد الحسيني
╭─┅═ঊঈ⚠ঊঈ═┅─╮
☛ @alhussini_IT ☚
╰─┅═ঊঈ☠ঊঈ═┅─╯
13 лют 2023, 18:17
3 443
2⃣حددِ๘ﮩ₰ﮩ₰ﮩ.❥المخرجات
هـــــہہـ٨ــ♡ـــــــــــــــــــ❥ـة
🎀👇🎀
#include <iostream>
using namespace std;
int main() {
int a[5]={1,6,3,2,9};
int i;
cout<<"\n----------------------\n";
for ( i = 1; i <= 5; i++ )
cout <<" "<< a[6 - i ] << " "; }
👇🏻👇🏻👇🏻
12 лют 2023, 14:17
3 443
1⃣حددِ๘ﮩ₰ﮩ₰ﮩ.❥المخرجات
هـــــہہـ٨ــ♡ـــــــــــــــــــ❥ـة
🎀👇🎀
#include <iostream>
using namespace std;
int main() {
int a[5]={1,2,3,4,5};
int i;
cout<<"\n------------------\n";
for ( i = 1; i <=5; i++ )
cout << a[5- i ] << " "; }
👇🏻👇🏻👇🏻
12 лют 2023, 14:11
3 443
❥͢ ❈↡
بعمل فقرة مختلفة اجيب اللكم سؤال وانتم تختارون الاجابة الصحيحة
دون عمل الكود بالـcompiler
👍🏻
12 лют 2023, 14:09
3 443
هديتي لجميع المشتركين ₰🥰🥰₰❥
#include <iostream>
using namespace std;
int main(){
int i,j;
int n=5;
for(i=n/2;i<=n;i+=2){
for (j=1;j<=n-i;j+=2){
cout<<" ";}
for (j=1;j<=i;j++){
cout<<" *";}
for (j=1;j<=n-i;j++){
cout<<" ";}
for(j=1;j<=i;j++){
cout<<" *";}
cout<<endl;}
for (i=n;i>=1;i--){
for (j=i;j<=n;j++){
cout<<" ";}
for (j=1;j<=(i*2)-1;j++){
cout<<" *";}
cout<<endl;}
return 0;}
!؟ ـــــہہـ٨ــ♥ــــــ❥ــہہـــــــــــــــ❥ــہہ00:00:00
✍✍ محمد الحسيني
╭─┅═ঊঈ⚠ঊঈ═┅─╮
☛ @alhussini_IT ☚
╰─┅═ঊঈ☠ঊঈ═┅─╯
10 лют 2023, 17:31
3 443
بـــرنــــامــــج₰💻💻₰❥
#المؤشرات و المصفوفات 👇🏻
#include<iostream>
using namespace std ;
int main() {
int num[5],i,*p;
p=num;
*p=10;
p++;
*p=20;
p=&num[2];
*p=30;
p=num+3;
*p=40;
p=num;
*(p+4)=50;
for(i=0;i<5;i++)
cout<<num[i]<<"\t";}
المخـ₰💻₰❥ـرجات
👇🏻
10 20 30 40 50
[Program finished]
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
•┈┈┈•❈••✦✾✦••❈•┈┈┈•
C# Language ➺┊
@programming_languag
C++ Language ➺┊
@programming_languages_IT_CS
Web Language ➺┊
@Web_Programming_Design
•┈┈┈•❈••✦✾✦••❈•┈┈┈•
10 лют 2023, 17:25
3 443
بـــرنــــامــــج₰💻💻₰❥
لتحديد المخرجات
#include<iostream>
using namespace std;
int main() {
int x = 1, y = 5;
int * ptr;
ptr = &x;
cout<<*ptr<<" ";
ptr = &y;
cout<<*ptr<<endl;
cout <<" #NoooSSah ";
return 0;}
المخـ₰💻₰❥ـرجات👇🏻
1 5
[Program finished]
!؟ ـــــہہـ٨ــ♡ـــــــــــــ❥ــہہ00:00:0
معلـو₰📚₰❥مات
1⃣ استخدام الـتعبير التالي:
cout <<*ptr ;
تعني باننا نتعامل مع محتوي القيمة التي يؤشر اليها المؤشر
اي طباعة القيمة المخزنة في العنوان
2⃣ استخدام الـتعبير التالي:
cout<<&ptr;
تعني طباعه عنوان موقع المؤشر
3⃣ استخدام الـتعبير التالي:
cout <<ptr;
تعني طباعه العنوان المخزن في المؤشر
!؟ ـــــہہـ٨ــ♥ــــــ❥ــہہـــــــــــــــ❥ــہہ00:00:00
✍✍ محمد الحسيني
╭─┅═ঊঈ⚠ঊঈ═┅─╮
☛ @alhussini_IT ☚
╰─┅═ঊঈ☠ঊঈ═┅─╯
10 лют 2023, 17:24
3 443
بـــرنــــامــــج₰💻💻₰❥
#المؤشرات 👇🏻
تحديد المخرجات
#include<iostream>
using namespace std;
int main() {
int value1 = 5, value2 =15;
int* p1;
int* p2;
p1 = &value1;
p2 = &value2;
*p1 =10;
*p2 = *p1;
p1 = p2;
*p1 =20;
cout << "value1=" <<value1<<" value2="<< value2<<endl;
cout <<" #NoooSSah ";}
المخـ₰💻₰❥ـرجات
value1=10 value2=20
[Program finished]
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
•┈┈┈•❈••✦✾✦••❈•┈┈┈•
C# Language ➺┊
@programming_languag
C++ Language ➺┊
@programming_languages_IT_CS
Web Language ➺┊
@Web_Programming_Design
•┈┈┈•❈••✦✾✦••❈•┈┈┈•
10 лют 2023, 17:22
3 443
بـــرنــــامــــج₰💻💻₰❥
#المؤشرات 👇🏻
تحديد المخرجات
#include<iostream>
using namespace std;
int main() {
int value1 = 5, value2 =15;
int* p1;
int* p2;
p1 = &value1;
p2 = &value2;
*p1 =10;
*p2 = *p1;
p1 = p2;
*p1 =20;
cout << "value1=" <<value1<<" value2="<< value2<<endl;
cout <<" @NoooSSah ";}
المخـ₰💻₰❥ـرجات
value1=10 value2=20
[Program finished]
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
•┈┈┈•❈••✦✾✦••❈•┈┈┈•
C# Language ➺┊
@programming_languag
C++ Language ➺┊
@programming_languages_IT_CS
Web Language ➺┊
@Web_Programming_Design
•┈┈┈•❈••✦✾✦••❈•┈┈┈•
10 лют 2023, 17:21
10 лют 2023, ~17:22
3 443
بـــرنــــامــــج₰💻💻₰❥
حذف التكرار لمصفوفة احادية ؟؟
#include<iostream>
using namespace std ;
int main() {
int x[10],i,j;
cout<<"enter the values : \n";
for (i=0;i<10;i++)
cin>>x[i];
cout<<"the values before eliminate repetitive values are \n";
for (i=0;i<10;i++)
cout<<x[i]<<"\t";
cout<<"\n";
for (i=0;i<10;i++)
for (j=0;j<10;j++)
if(x[i]==x[j] && i != j)
x[j]=0;
cout<<"\nthe values after the eliminate \n";
for (i=0;i<10;i++)
if(x[i]!=0)
cout<<x[i]<<"\t";
else
cout<<" ";}
المخـ₰💻₰❥ـرجات
👇🏻
enter the values :
1 4 8 4 7 2 5 9 5 7
the values before eliminate repetitive values are
1 4 8 4 7 2 5 9 5 7
the values after the eliminate
1 4 8 7 2 5 9
[Program finished]
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
•┈┈┈•❈••✦✾✦••❈•┈┈┈•
C# Language ➺┊
@programming_languag
C++ Language ➺┊
@programming_languages_IT_CS
Web Language ➺┊
@Web_Programming_Design
•┈┈┈•❈••✦✾✦••❈•┈┈┈•
09 лют 2023, 16:29
3 443
بـــرنــــامــــج₰💻💻₰❥
لايجاد القاسم المشترك الاكبر بين عددين مدخلين مستخدمآ الدوال؟؟
#include<iostream>
using namespace std ;
int g_c_d(int x,int y) {
int i;
for(i=x ; i>0 ; i--)
if(x%i==0 && y%i==0)
break;
cout <<endl;
return i;}
int main() {
int a ,b ;
cout <<"enter 2 number :\n";
cin >>a >>b ;
cout<<g_c_d(a,b);}
المخـ₰💻₰❥ـرجات
👇🏻
enter 2 number :
4
64
4
[Program finished]
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
•┈┈┈•❈••✦✾✦••❈•┈┈┈•
C# Language ➺┊
@programming_languag
C++ Language ➺┊
@programming_languages_IT_CS
Web Language ➺┊
@Web_Programming_Design
•┈┈┈•❈••✦✾✦••❈•┈┈┈•
05 лют 2023, 16:19
3 443
بـــرنــــامــــج₰💻💻₰❥
لإيجاد تقريب اي عدد كسري مدخل من المستخدم؟ ؟
#include<iostream>
using namespace std;
int func(float x) {
int y=x;
if(x-y>=0.5)
return (y+1);
else
return y; }
int main() {
float a;
cin>>a;
cout<<func(a);}
المخـ₰💻₰❥ـرجات
👇🏻
5.7
6
[Program finished]
!؟ ـــــہہـ٨ــ♥ــــــ❥ــہہـــــــــــــــ❥ــہہ00:00:00
✍✍ محمد الحسيني
╭─┅═ঊঈ⚠ঊঈ═┅─╮
☛ @alhussini_IT ☚
╰─┅═ঊঈ☠ঊঈ═┅─╯
05 лют 2023, 16:18
3 443
بـــرنــــامــــج₰💻💻₰❥
برنامج الحاسبة للقيام بالعمليات الاربع مستخدم الدوال؟؟
#include<iostream>
using namespace std ;
int sum(int x,int y)
{int m=x+y; return m;}
int sub(int x,int y)
{int m=x-y; return m;}
int mul(int x,int y)
{int m=x*y; return m;}
int div(int x,int y)
{int m=x/y; return m;}
int main() {
int a,b;
char c,d;
for(;;) {
cout<<"enter a : ";
cin>>a;
cout<<"enter the operation : ";
cin>>c;
cout<<"enter b : ";
cin>>b;
switch(c) {
case'+':
cout<<"the result is "<<sum(a,b);
break;
case'-':
cout<<"the result is "<<sub(a,b);
break;
case'*':
cout<<"the result is "<<mul(a,b);
break;
case'/':
cout<<"the result is "<<div(a,b);
break;
default:
cout<<"undefined operation";
break;}
cout<<"\ndo you want to continue? (Y/N) : \n"; cin>>d;
if(d=='Y') {
continue;
cout<<"\n"; }
else {
cout<<"\ngoodboy";
break;}}}
المخـ₰💻₰❥ـرجات
👇🏻
enter a : 2
enter the operation : *
enter b : 3
the result is 6
do you want to continue? (Y/N) :
N
goodboy
!؟ ـــــہہـ٨ــ♡ـــــہہـ٨ــ♡ــــــــــــ❥ــہہ00:00:00
•┈┈┈•❈••✦✾✦••❈•┈┈┈•
C# Language ➺┊
@programming_languag
C++ Language ➺┊
@programming_languages_IT_CS
Web Language ➺┊
@Web_Programming_Design
•┈┈┈•❈••✦✾✦••❈•┈┈┈•
05 лют 2023, 16:18
3 443
للايجار شقه في عمارة
حي القيروان
مكون من ٣غرف نوم
مجلس وصاله
غرفه خادمه
مطبخ مكيفات راكب
ثلاث حمامات
موقف سياره
مصعد
السعر 37 دفعه واحده
دفعتين 42
05 лют 2023, 14:24
05 лют 2023, ~14:25
