‏إظهار الرسائل ذات التسميات برامج cplusplus. إظهار كافة الرسائل

برنامج بلغة C++ لحساب الجذر التربيعى للرقم المدخل

0 التعليقات


اكتب برنامج بلغة C++ لحساب الجذر التربيعى للرقم المدخل 



#include <iostream>
using namespace std;
#include <math.h>
void main ( )
{
  float num, ans;
  cout << " Enter a number: ";
  cin >> num;
  ans = sqrt(num) ;
  cout << " square root is: " << ans << endl;
  system("pause");
}

تابع القراءه »

برنامج بلغة C++ لحساب مساحة الدائرة area بدلالة نصف القطر

3 التعليقات

اكتب برنامج بلغة C++ لحساب مساحة الدائرة area بدلالة نصف القطر 


#include <iostream>
using namespace std;
void main ( )
{
   float R, Area;
   float p1 = 3.14 ;
   cout << " Enter radius of circle: " ;
   cin >> R;
   Area = p1 * R * R;
   cout << " Area is: " << Area << endl;
   system("pause");
} 

تابع القراءه »

برنامج بلغة C++ يقوم بطباعة مربعات الارقام من 0 لحد 14

0 التعليقات

اكتب برنامج بلغة C++ يقوم بطباعة مربعات الارقام من 0 لحد 14 

#include <iostream>
using namespace std;
void main ( )
{
   for (int i = 0; i < 15; i++)
   cout << i * i << " "<<endl;
   system("pause");
}


تابع القراءه »

برنامج لطباعة حرف E على الشاشة متكون من حرف x

0 التعليقات

 برنامج يظهر حرف E على الشاشة متكون من حرف x وذلك بتكراره.


#include <iostream>

using namespace std;
void main ( )
{
   cout << "xxxxxxxx" << endl;
   cout << "x" << endl;
   cout << "x" << endl;
   cout << "xxxxxxxx" << endl;
   cout << "x" << endl;
   cout << "x" << endl;
   cout << "xxxxxxxx" << endl;
   system("pause");
}

تابع القراءه »

برنامج بلغة C++ يطلب من المستخدم ادخال عددين ويجرى عليهم الجمع والطرح والقسمه عدد من المرات

0 التعليقات
برنامج يقوم بإدخال عددين ومن ثم إجراء عمليات الجمع والطرح والضرب والقسمة عليهما (لعدد من المرات يترك تحديده لرغبة المستخدم).

#include <iostream>
using namespace std;
void main ()
{
float L, M;
char ch;
do
{
cout << "\nEnter L: ";
cin >> L;
cout << "Enter M: ";
cin >> M;
cout << "\nL+M= " << L+M;
cout << "\nL-M= " << L-M;
cout << "\nL*M= " << L*M;
if (M != 0)
cout << "\nL/M= " << L/M;
cout << " \n Do Again (y/n): ";
cin >> ch;
}
while (ch != 'n');
system("pause");
}

تابع القراءه »

برنامج بلغة C++ يطلب من المستخدم ادخال عددين ويجرى عليهم الجمع والطرح والقسمه

0 التعليقات
 برنامج يقوم بإدخال عددين ومن ثم إجراء عمليات الجمع والطرح والضرب والقسمة عليهما.

#include <iostream>

using namespace std;
void main ()
{
int x, y;
cout << "x= ";
cin >> x;
cout << "y= ";
cin >> y;
cout << "x+y= " << x+y << endl;
cout << "x-y= " << x-y << endl;
cout << "x*y= " << x*y << endl;
if (y != 0)
cout << "x/y= " << (float)x/y << endl;
system("pause");
}


تابع القراءه »

برنامج جمع وطرح رقمين بلغة C++

0 التعليقات


مجموعة برامج بلغة C++

اكتب برنامج بلغة C++ يقوم بجمع رقمين
ًWrite a C++ program to calculate the sum of two numbers

#include<iostream>
using namespace std;
int main()
{
int x=10;
    int y=20;
    int z;
     z=x+y;
    cout<<"the Result of z is: "<<z<<endl;
   system("pause");
   return 0 ;
}


اكتب برنامج بلغة C++ يطلب من المستخدم رقمين ثم اطبع ناتج جمعهم على الشاشة

write a program to calculate a sum of two numbers entered from keyboard



#include<iostream>
using namespace std;
void main()
{
int x;
    int y,z;
    cin>>x>>y;
    z=x+y;
    cout<<"the Result of z is:\n\a"<<endl;
    cout<<z;
    system("pause");
}





اكتب برنامج بلغة C++ يقوم بطرح رقمين 
ًWrite a C++ program to calculate the difference of two 

#include<iostream>
using namespace std;
int main()
{
int x=100;
    int y=20;
    int z;
     z=x-y;
    cout<<"the Result of z is: "<<z<<endl;
   system("pause");
   return 0 ;
}





تابع القراءه »

برنامج لحساب مساحة المستطيل بلغة C++

0 التعليقات
Write a C ++ program to calculate the area of the rectangle which the user enters the length and width and then print  the result

أكتب برنامج بلغة C++ يقوم بحساب مساحة المستطيل الذي يقوم المستخدم بإدخال أطواله ثم أطبع النتيجة
#include <iostream>
using namespace std;
int main()
{
     
    double Length, Width;
    cout << "Enter the Length :";
    cin >> Length;
    cout << "Enter the Width : ";
    cin >> Width;
    cout << "The area is: " << Length*Width << endl;
    system("pause");
    return 0;

تابع القراءه »