تعلم البرمجة بلغة<++C> من البداية
Ir al canal en Telegram
1 087
Suscriptores
Sin datos24 horas
Sin datos7 días
Sin datos30 días
Archivo de publicaciones
#include <iostream>
using namespace std;
int main(){
char A,B,C,D,E,Y,S,N;
S= . ;
N= ;
for(Y= A ; Y<= E ; Y++)
{cout<<endl;
for(int i=1; i<=5; i++)
cout<<Y<<S<<i<<N;
}
return 0;
}
☘☘☘☘☘
المخرجات
A.1 A.2 A.3 A.4 A.5 B.1 B.2 B.3 B.4 B.5 C.1 C.2 C.3 C.4 C.5 D.1 D.2 D.3 D.4 D.5 E.1 E.2 E.3 E.4 E.5 [Program finished]
#include <iostream>
using namespace std;
int main(){
for(int i=6; i>0; i--){
cout<<i;
cout<<endl;}
return 0;
}
🌿🌿🌿🌿
المخرجات
6
5 4 3 2 1 [Program finished]
حدد المخرجات
🌸🌸🌸
#include <iostream>
using namespace std;
int main(){
for(int i=6; i>0; i--){
for(int j=i; j<=i; j++){
cout<<i;}
cout<<endl;}
return 0;
}
🌸🌸🌸🌸
المخرجات
6
5 4 3 2 1 [Program finished]
#include <iostream>
using namespace std;
int main(){
//loop 20 times
for(int counter=1; counter<=20; counter++){
if(counter%5==0)
cout<<counter<<endl;
}
return 0;
}
🌿🌿🌿🌿🌿
المخرجات
5
10 15 20 [Program finished]
🌸🌸🌸🌸
هذا البرنامج يكرر الfor عشرون مره ولا تنفذ الااربع مرات 👍
حدد المخرجات. 👍👍
#include <iostream>
using namespace std;
int main(){
for(int n=10; n>0; n--){
if(n==5) continue;
cout<<n <<",";
}
cout<<"FIRE!\n";
return 0;
}
🌸🌸🌸
المخرجات
10,9,8,7,6,4,3,2,1,FIRE!
[Program finished]
//حدد المخرجات
#include <iostream>
using namespace std;
int main(){
int x;
cin>>x;
switch(x){
case 1:
case 2:
case 3:
cout<<"x is 1, 2,or 3"; break;
default:
cout<<"x is not 1,2 not 3";
}
return 0;
}
❤️❤️❤️❤️
المخرجات
اذا ادخل.
3
x is 1, 2,or 3 [Program finished]
🌸🌸🌸
6
x is not 1,2 not 3 [Program finished]
//حدد المخرجات
#include <iostream>
#include <conio.h>
#include <stdio.h>
using namespace std;
int main(){
for(int i=6; i>0; i--){
for(int j=1; j<=i; j++){
cout<<i;
} cout<<endl;
}
getch();
return 0;
}
🌿🌿🌿🌿🌿
المخرجات:
666666
55555 4444 333 22 1
👍
//حدد المخرجات
#include <iostream>
#include <conio.h>
using namespace std;
int main(){
int sum=5, i=2;
cout<<sum*i;
sum+10;
i++;
i=i+2;
cout<<i;
i=i*10;
cout<<i;
for(i=4; i<=0; i-=2)
//cout<<i*i;
cout<<"*";
getch();
return 0;
}
المخرجات:
✨✨✨✨✨✨
10550
//حدد المخرجات
#include <iostream>
#include <conio.h>
using namespace std;
int main(){
int sum=0, i=2;
--sum;
cout<<sum*i<<endl;
sum+10;
i++;
i=i+2;
//cout<<i;
cout<<sum<<endl;
sum=i*10;
cout<<i;
for(i=4; i<=0; i-=2)
cout<<i*i;
//cout<<"*";
getch();
return 0;
}
🌿🌿🌿🌿
المخرجات:
-2
-1
5
//حدد المخرجات
#include <iostream>
#include <conio.h>
using namespace std;
int main(){
int sum=0, i=2;
--sum;
cout<<sum*i<<endl;
sum+10;
i++;
i=i+2;
//cout<<i;
cout<<sum<<endl;
sum=i*10;
cout<<i;
for(i=4; i<=0; i-=2)
cout<<i*i;
//cout<<"*";
getch();
return 0;
}
🌿🌿🌿🌿
المخرجات:
-2
-1
5
//حدد المخرجات
👩💻👩💻👩💻
#include <iostream>
#include <conio.h>
using namespace std;
int main(){
int x,w;
cout<<"enter the x:";
cin>>x;
if(x>0){
w=2*(x*x+1);
x=3*w;}
else
if(x==0){
w=3*(x)+5;
x=2*w;}
else {
w=5*x*x*x-1;
x=4*w;}
cout<<w+x;
getch();
return 0;
}
🌿🌿🌿🌿🌿🌿🌿🌿🌿🌿
المخرجات:
اذا
enter the x:-1
-30 [Program finished]
🌸🌸🌸
اذا ادخل
enter the x:3
80 [Program finished]
🌸🌸🌸
اذا ادخل
enter the x:0
15 [Program finished]
//حدد المخرجات
#include <iostream>
#include <conio.h>
using namespace std;
int main(){
for(int i=0; i<5; i++){
for(int j=0; j<5; j++){
if( i==2 || j==2 )
cout<<"*";
else
cout<<" ";
}
cout<<endl; }
getch();
return 0;
}
🌸🌸🌸
المخرجات:
*
*
*
*
*
اعملوها بالcompiler تكون اصح
لانها بتنحذف عليا نجوم 👍
//حدد المخرجات
#include <iostream>
#include <conio.h>
using namespace std;
int main(){
for(int i=0; i<5; i++){
for(int j=0; j<8; j++){
if( i==2 )
cout<<"*";
else
cout<<" ";
}
cout<<endl; }
getch();
return 0;
}
💞💞💞
المخرجات:
****
finish program
في البرنامج👆احنا مش بحاجه مكتبه ال math لان مافي علاقه رياضيه يعملها الcompiler حيث انها لاتغير في مخرجات البرنامج .👌
//حدد المخرجات:
#include <iostream>
#include <math.h>
using namespace std;
int main(){
for(int i=0; i<5; i++){
for(int j=0; j<5; j++){
if( i==4 || j==2)
cout<<"*";
else
cout<<" ";
}
cout<<endl; }
return 0;
}
🌸🌸🌸
المخرجات :
*
*
*
*
*
finish program
المخرجات:
بتعملو الكود بالكمبايلر وبتشوفو المخرج لاني اكتبها وتنحذف نجوم يعني بتضهر ب compiler صح .
😉 👍
//حدد المخرجات
#include <iostream>
#include <math.h>
using namespace std;
int main(){
for(int i=0; i<5; i++){
for(int j=0; j<5; j++){
if( i==2 || j==4)
cout<<"*";
else
cout<<" ";
}
cout<<endl; }
return 0;
}
المخرجات.
*
*
*
*
*
👏👏👏👏
المجال Scope:
تعني بأنه لايمكن تهيئة متغير قبل الاعلان عنه
مثال.....:
int main(){
x=11; //error: this is not in the scope.
....................
int y;
y=5; // ok: this is in the score
