0% found this document useful (0 votes)
29 views3 pages

Travail Malak

Uploaded by

Boubou Anas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views3 pages

Travail Malak

Uploaded by

Boubou Anas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Exo 1

#include<iostream>
using namespace std;
int main ()
{
int a ;
cout<<"type your first variable";
cin>>a;
cout<<"your first variable is : "<<a<<endl ;

int b ;
cout<<"type your second variable";
cin>>b;
cout<<"your second variable is : "<<b<<endl;
rutern 0 ;
}
Exo 2
#include<iostream>
using namespace std;
int main ()
{
int a=9,i=1;

for (i=10 ; i<=99 ; i++)


{
cout<<"the variable of i is :"<<i<<endl;
}
}
Exo 2
#include<iostream>
using namespace std;
int main ()
{
int i=10;
while ( i>9 && i < 100 )

{
cout<<"the variable of i is:"<<i<<endl;
i=i+1;
}

return 0;
}
#include<iostream>
using namespace std;
int main ()
{
int a,b, min ;
cout<<"type a variable "<<endl;
cin>>a;
cout<<"type a second variable "<<endl;
cin>>b;
min= a,b;
for(int i=3;i<=10;i=i+1)
{
cout<<"type an other variable"<<endl;
cin>>a;
if (min>a,b)
min=a,b;
}
cout<<"the the smallest value is:"<<min;

return 0;
}

Exo 3
//2 eme methode
/* #include<iostream>
using namespace std;
int main ()
{
int a,b,c,d,e,f,j,h,i,g, min ;
cout<<"type the first variable "<<endl;
cin>>a;
cout<<"type a second variable "<<endl;
cin>>b;
cout<<"type an other variable "<<endl;
cin>>c;
cout<<"type an other variable "<<endl;
cin>>d;
cout<<"type an other variable "<<endl;
cin>>e;
cout<<"type an other variable "<<endl;
cin>>f;
cout<<"type an other variable "<<endl;
cin>>j;
cout<<"type an other variable "<<endl;
cin>>h;
cout<<"type an other variable "<<endl;
cin>>i;
cout<<"type the last variable "<<endl;
cin>>g;

min= a,b,c,d,e,f,j,h,i,g;

cout<<"the the smallest value is:"<<min;

return 0; */
}
Exo 4

#include<iostream>
using namespace std;
int main ()
{
int N,u=3,i;

cout<<"taper un entier N "<<endl;


cin>>N;

for(i=0 ; i<N ; i=i+1)


u=u*3+4;
{
cout<<"u("<<N<<")="<<u<<endl;
}

return 0;
}
Exo 5
#include<iostream>
using namespace std;
int main ()
{
int x=0,choix;
do
{
cout<<"x vaut"<<x<<endl;
cout<<"1:ajouter 1"<<endl;
cout<<"2:multiplier par 2"<<endl;
cout<<"3:soustraire 4"<<endl;
cout<<"4:quitter"<<endl;
cout<<"votre choix:";cin>>choix;
switch(choix)
{
case 1:x++; break;
case 2:x=x*2; break;
case 3:x=x-4; break;
}
}
while(choix=4);
cout<<"la valeur finale de x vaut :"<<x<<endl;

return 0;
}
Exp 7

using namespace std;


int main ()
{
cout<<"université badji mokhtar annaba"<<endl;
cout<<"departement de l'éléctronique"<<endl;
cout<<"faculé:science de l'ingeniorat"<<endl;
cout<<"nom:amrani"<<endl;
cout<<"prénom:nedjeme eddine"<<endl;
cout<<"devoir poo"<<endl;
cout<<"2021/2022"<<endl;

You might also like