This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Article | |
{ | |
private int référence; | |
private string désignation; | |
private double prixHT; | |
private static double tauxTVA = 0; //constante partagée au niveau de la classe Article | |
public static double TauxTVA | |
{ | |
get { return tauxTVA; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Employé | |
{ | |
private int matricule; | |
private string nom, prénom; | |
private DateTime datenaissance, dateembauche; | |
private double salaire; | |
public double Salaire | |
{ | |
get { return salaire; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Point | |
{ | |
private double x, y; | |
public double Y | |
{ | |
get { return y; } | |
set { y = value; } | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Complexe | |
{ | |
private double reel,imaginaire; | |
public double Imaginaire | |
{ | |
get { return imaginaire; } | |
set { imaginaire = value; } | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Rectangle | |
{ | |
private double longueur, largeur; | |
public double Largeur | |
{ | |
get { return largeur; } | |
set { largeur = value; } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Livre | |
{ | |
private string titre, auteur; | |
private double prix; | |
Action<string> msgr = s => Console.WriteLine(s); | |
Action<string> msg = s => Console.Write(s); | |
public Livre(string titre="", string auteur="", double prix=0) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Point | |
{ | |
private int x, y; | |
public void setx(int x) | |
{ | |
this.x = x; | |
} | |
public int getx() | |
{ | |
return x; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*--------------------------------------------------------------------------------------------------------------------------- | |
Analyse: | |
jour: 1<=j<=(28, 29, 30 ou 31) | |
mois: 1<=m<=12 | |
année: 1<=a<=... | |
annee_biss = vrai si (annee%4 = 0) et (annee%100 != 0) | |
annee_biss = vrai si (annee%400 = 0) | |
---------------------------------------------------------------------------------------------------------------------------*/ | |
#include<stdio.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//--------------------------------------------------------------------------------------------------------------------------- | |
// temp_appel = (nbr_min*60) + nbr_sec //(en secondes) | |
// nbr_unit = temp_appel/unit //(unit = 20 sec) | |
// cout_3min = 12,6 DH //(cout_3min = 180/20 * 1,40 = 9*1,40 = 12,6) | |
// cout_next = nbr_unit * prix_unit + rest_sec //(rest_sec = 0 si: temp_appel%unit=0 , sinon: rest_sec = 1,20) | |
// cout_appel = cout_3min + cout_next | |
//--------------------------------------------------------------------------------------------------------------------------- | |
#include<stdio.h> | |
int main() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
main() | |
{ | |
printf("**************************************************************\n"); | |
printf("Répartition d’une somme d’argents en billets et pièces\n"); | |
printf("**************************************************************\n"); | |
int S, _200,R_200, _100,R_100, _50,R_50, _20,R_20, _10,R_10, _5,R_5, _1 ; | |
printf("\nEntrez une somme d'argent (en DH): "); | |
scanf("%d", &S); | |
_200 = S/200 ; |