تعلم البرمجة بلغة ++C
Open in Telegram
💻 الى كل المبرمجين 🔴سوف تجد شرح لغة السي بلاس بلاس للمبتدئين حتى الاحتراف 📺فيدوهات شرح عديدة 🎥 برامج مجانية 🎁 مشاريع مجانيه 📚 كتب تصميم وبرمجة 📚 مراجع واسئلة محلولة 💻برامج واكواد كثيرة كل ذلك في قناتي 👇 https://t.me/LearnCPlus_Plus
Show more2 315
Subscribers
-224 hours
-67 days
-2630 days
Posts Archive
انتبه أن تظلك سحابة اليأس أثناء الامتحان ..
إليك 7 نصائح لتبعد هذه السحابة عنك 🌫☁️
1- استعد جيداً وذاكر بتركيز.
2- استمع باهتمام لتعليمات اللحظة الأخيرة التي يقدمها المدرس.
3- احرص على النوم بشكل كافي في ليلة الإمتحان.
4- حاول أن تصل مبكراً الى مكان الإمتحان وخذ بعض الوقت للاسترخاء.
5- اقرأ الأسئلة بعناية في البرمجه فهم السؤال 90% من الحل (قد تفرح بوجود سؤال دورة سابقة لكنك لم تشعر أن به تغيير فتجاوب على سؤال الدورة وليس السؤال المطلوب).
6- لا تهدر الوقت, تخطى السؤال الذي لا تعرف إجابته وانتقل الى السؤال التالي.
7- كن إيجابياً, اذا انتهيت باكراً راجع معلوماتك وحاول الإجابة على الأسئلة التي تخطيتها بشكل منطقي.
#نصائح_امتحانية
https://t.me/LearncPlusPlusplusplusanguage
أرسلوا الرابط لزملائكم لعلهم يستفيدوا
// Write a program to create a class with Static Member function.
#include<iostream>
#include<conio.h>
using namespace std;
class Static_demo
{ public:
static void check_prime(int); //sta_mem. function declaration
};
void Static_demo::check_prime(int a) //sta_member function definition
{
int i, j;
int c=0;
for(i=1; i<=a; i++)
{
if(a%i == 0)
c++;
}
if(c<=2)
cout<<a<<" is a prime number"<<endl;
else
cout<<a<<" is not a prime number"<<endl;
}
int main()
{
int n;
cout<<"Enter a numbet to check whether it is prime or not : ";
cin>>n;
Static_demo::check_prime(n);
//calling static member function
getch();
return 0;
}
//Write a program for Single Inheritance.
#include<iostream>
#include<conio.h>
using namespace std;
const float pi=22/7.0; //constant variable pi
class circle //base class
{
public:
float radius;
void area()
{ cout<<"Enter the radius for circle:";
cin>>radius;
cout<<"Area of Circle is: "<<(pi)*radius*radius;
}
};
class sphere: public circle //intermediate base class
{
public:
void volume()
{ cout<<"\nEnter the radius for sphere: ";
cin>>radius;
cout<<"Volume of Sphere is : "<<(4*(pi)*radius*radius*radius)/3;
}
};
int main()
{ circle c1;
sphere sp;
c1.area();
sp.volume();
return 0;
}
#include<iostream>
#include<conio.h>
using namespace std;
class Polar
{
float radius, angle; //data members
public:
void input()
{ cout<<"Enter radius : ";
cin>>radius;
cout<<"Enter angle : ";
cin>>angle;
}
void display() //member fun. definition
{
cout<<"Radius = "<<radius<<endl;
cout<<"Angle = "<<angle<<endl;
}
friend Polar add(Polar,Polar); //friend function declaration
};
Polar add(Polar p1,Polar p2) //friend function definition
{
Polar temp;
temp.radius = p1.radius + p2.radius;
temp.angle = p1.angle + p2.angle; //Adding two Polar object
return temp; // then return a Polar object
}
int main()
{
Polar p1, p2, addition; //objects created
cout<<"Enter First object : "<<endl<<endl;
p1.input();
cout<<endl<<"Enter second object : "<<endl<<endl;
p2.input();
cout<<endl;
addition = add(p1, p2); //calling friend function add(Polar,Polar)
cout<<endl<<"First object : "<<endl;
p1.display();
cout<<endl<<"Second object : "<<endl;
p2.display();
cout<<endl<<"Addition of first & second : "<<endl;
addition.display();
return 0;
}
//Write a program to demonstrate Friend function.
#include<iostream>
using namespace std;
float sim_inter(int , int , int );
float sim_inter(int x, int y=1, int z=1)
// A function with default arguments, it can be called with
{
// 2 arguments or 3 arguments or 4 arguments
float sim_inter;
sim_inter =(x*y*z)/100;
return sim_inter;
}
int main()
/* Driver program to test above function*/
{
int p,r,t;
float i;
cout << "\n\n Calculate the Simple Interest :\n";
cout << " -----------------------------------\n";
cout<<" Input the Principle: ";
cin>>p;
cout<<" Input the Rate of Interest: ";
cin>>r;
cout<<" Input the Time: ";
cin>>t;
i = sim_inter(p, r, t);
cout<<" The Simple interest for the amount "<<p<<" for "<<t<<" years@ "<<r<<" %is: "<<i;
cout << endl;
return 0;
}
#include <iostream>
using namespace std;
int prime();
int prime() // Return type of function is int
{ int n;
cout<<"Enter a positive integer to check: ";
cin >> n;
return n;
}
int main()
{ int num, i;
bool isPrime = true;
num = prime(); // No argument is passed to prime()
if (num == 0 || num == 1)
{ isPrime = false; }
else {
for (i = 2; i <= num/ 2; ++i) {
if (num% i == 0) {
isPrime = false; break;
}
}
}
if (isPrime)
cout << num << " is a prime number";
else
cout << num << " is not a prime number";
return 0;
}
//برنامج ادخل رقم ويتم فحصة هل هو عدد أولي أو لا
#include <iostream>
using namespace std;
int main (){
string array[5], item ;
cout << "here is the array befor stored entet it \n";
for (int i=0 ; i <5 ; i++)
cin >> array [i];
for (int i =0 ; i<5-1 ; i++)
for (int j=i ; j<5; j++)
if (array[j] < array[i]){
item = array[j];
array [j] = array [i];
array [i] = item ;}
cout << "here is the array after stored\n";
for (int i=0 ; i <5 ; i++)
cout << array[i]<<"\t";
return 0;
}
//برنامج ترتيب الكلمات تصاعدياً
#include <iostream>
using namespace std;
int Dividing(int a){
return a/2;
}
int main ()
{
int x;
cout<<"Enter the number : \n";
cin>>x;
cout<<Dividing(x);
return 0;
}
#include <iostream>
using namespace std;
int main ()
{
for (int i=1; i<29;i++)
{
cout<<i<<" ";
}
return 0;
}
# include <iostream>
using namespace std;
class employee {//هنا كتبنا اسم الكلاس
public://كتبنا العناصر اللي نريدها
int id=10;
char name[20]="aaahhhbb";
};
int main()
{
employee E;// عرفنا اوبجكت من نوع كلاس
cout << "employee ID : "<< E.id<<endl;//طبعنا الاوبجكت
cout<<"employee Name : "<<E.name<<endl;
return 0;
}
Available now! Telegram Research 2025 — the year's key insights 
