برنامج جمع وطرح رقمين بلغة C++
مجموعة برامج بلغة 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 ;
}
0 التعليقات: