Accueil > > > PROGRAMME QUI CALCUL LES VENTES TRIMESTRIELLES ...
PROGRAMME QUI CALCUL LES VENTES TRIMESTRIELLES ...
Information sur la source
Description
encodez au moins 3 produits pour tester le prog (option 1) et livrez en au moins 3 (option 2)pour voir le resultat(option 3)
sinon je penserais à créer une page annexe pour afficher les produits + leurs id + leur prix et la tva avec une option "voir liste"
en attendant ...
Source
- #include <stdio.h>
- #include <stdlib.h>
- #include <conio.h>
- #include <ctype.h>
- #include<dos.h>
-
-
- struct produits
- { int mois;
- int n_piece;
-
- } tprod[25];
-
- struct pieces
- {
- char libelle[11];
- long n_fourn;
- int prix_htva;
- int code;
-
- } tpieces[300];
-
- struct trime {
- int n_pcs;
- char libelle[11];
- int prix;
- int trim1;
- int trim2;
- int trim3;
- int trim4;
- int quantite;
- } t_res[10];
- int der=0;
-
- int encode_pieces ()
-
- {
-
- clrscr();
-
- printf("********* encodage de pieces ***************** \n");
- getch();
- der++;
-
- { printf(" entrez libelle (10 caract max!!): \n");scanf("%s",tpieces[der].libelle);
- tprod[der].n_piece=der;
- printf(" nøfournisseur : \n");scanf("%d",&tpieces[der].n_fourn);
- printf(" entrez prix : \n");scanf("%d",&tpieces[der].prix_htva);
- printf(" entrez code tva : \n");scanf("%d",&tpieces[der].code);
- clrscr();
- }
-
-
- { t_res[der].n_pcs=tprod[der].n_piece;
- strcpy(t_res[der].libelle,tpieces[der].libelle);
- t_res[der].prix=tpieces[der].prix_htva;
- }
-
-
-
- return 0;
-
- }
-
- int encode_prod ()
-
- {
- int mois=0;
- int quant=0;
- int ind=0;
- clrscr();
-
- printf(" ************* listing des courses *************** \n");
- getch();
-
- fflush(stdin);
-
-
- { printf(" entrez le mois pour livraison svp [de 1 … 12 ]: \n");scanf("%d",&mois);
- printf(" entrez le nøde la piece voulue ");scanf("%d",&ind);printf(" vous avez choisi un(e) %s \n",tpieces[ind].libelle);
- printf(" quantit‚ : \n");scanf("%d",&quant);
- t_res[ind].quantite+=quant;
- clrscr();
-
- if (mois>0 && mois<4) { t_res[ind].trim1+=(quant*tpieces[ind].prix_htva); }
-
- else if (mois>3 && mois <7) { t_res[ind].trim2+=(quant*tpieces[ind].prix_htva);}
-
- else if (mois>6 && mois <10) { t_res[ind].trim3+=(quant*tpieces[ind].prix_htva); }
-
- else if (mois>9 && mois <13) { t_res[ind].trim3+=(quant*tpieces[ind].prix_htva);}
-
- } /* boucle for */
-
-
-
-
- return 0;
-
- }
- /* ************************************************************************ */
-
- int charger ()
-
- { int i=0;
- int max;
- clrscr();
-
-
-
- fflush(stdin);
- printf(" r‚capitulatif des ventes trimestrielles \n");
- printf(" -----------------------------------------------\n");
- printf(" nø du produit libelle quantite prix \n");
- printf(" ------------------------------------------------------\n");
-
- for (i=1;i<der+1;i++)
-
- { printf(" %d %s %d %d \n\n",t_res[i].n_pcs,t_res[i].libelle,t_res[i].quantite,t_res[i].prix);
-
- }
-
- printf("\n");
- printf(" nø produit 1øtrim 2øtrim 3øtrim 4øtrim \n");
-
- for(i=1;i<der+1;i++)
-
- {
- printf(" %d %s %d %d %d %d \n",t_res[i].n_pcs,t_res[i].libelle,t_res[i].trim1,t_res[i].trim2,t_res[i].trim3,t_res[i].trim4);
-
-
- }
-
- getch();
- clrscr();
- return 0;
-
- }
-
- int menu()
-
- { char c=NULL;
-
-
- struct time heure_actuelle;
- gettime(&heure_actuelle);
- clrscr();
-
- textcolor(10);
- puts(" ------------- MENU ENCODAGE ---------------\n\n\n");
-
- printf(" horloge systeme : %d h %d min %d sec\n\n",heure_actuelle.ti_hour,heure_actuelle.ti_min,heure_actuelle.ti_sec);
-
- while (c!='4')
- {
- printf(" encoder tableau des pieces [1] \n");
- printf(" encoder tableau des produits [2] \n");
- printf(" charger les resultats [3] \n");
- printf(" quitter [4] \n");
-
- c=toupper(getch());
- switch (c)
-
- { case '1': encode_pieces();break;
- case '2':encode_prod(); break;
- case '3': charger(); break;
-
- };
-
- }
- clrscr();
-
- return 0;
- }
-
- int main ()
-
- { clrscr();
-
- printf(" avant de commencer … encoder voil… quelques petits conseils :\n\n -encode au moins 3 produits \n -retiens les numeros des 3 produits et … quelles produits ils correspondent\n\n\n Voil… c tout, … toi de tester ...\n");
-
- getch();
-
- fflush(stdin);
- textcolor(10);
- menu();
-
- return 0;
-
- }
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <ctype.h>
#include<dos.h>
struct produits
{ int mois;
int n_piece;
} tprod[25];
struct pieces
{
char libelle[11];
long n_fourn;
int prix_htva;
int code;
} tpieces[300];
struct trime {
int n_pcs;
char libelle[11];
int prix;
int trim1;
int trim2;
int trim3;
int trim4;
int quantite;
} t_res[10];
int der=0;
int encode_pieces ()
{
clrscr();
printf("********* encodage de pieces ***************** \n");
getch();
der++;
{ printf(" entrez libelle (10 caract max!!): \n");scanf("%s",tpieces[der].libelle);
tprod[der].n_piece=der;
printf(" nøfournisseur : \n");scanf("%d",&tpieces[der].n_fourn);
printf(" entrez prix : \n");scanf("%d",&tpieces[der].prix_htva);
printf(" entrez code tva : \n");scanf("%d",&tpieces[der].code);
clrscr();
}
{ t_res[der].n_pcs=tprod[der].n_piece;
strcpy(t_res[der].libelle,tpieces[der].libelle);
t_res[der].prix=tpieces[der].prix_htva;
}
return 0;
}
int encode_prod ()
{
int mois=0;
int quant=0;
int ind=0;
clrscr();
printf(" ************* listing des courses *************** \n");
getch();
fflush(stdin);
{ printf(" entrez le mois pour livraison svp [de 1 … 12 ]: \n");scanf("%d",&mois);
printf(" entrez le nøde la piece voulue ");scanf("%d",&ind);printf(" vous avez choisi un(e) %s \n",tpieces[ind].libelle);
printf(" quantit‚ : \n");scanf("%d",&quant);
t_res[ind].quantite+=quant;
clrscr();
if (mois>0 && mois<4) { t_res[ind].trim1+=(quant*tpieces[ind].prix_htva); }
else if (mois>3 && mois <7) { t_res[ind].trim2+=(quant*tpieces[ind].prix_htva);}
else if (mois>6 && mois <10) { t_res[ind].trim3+=(quant*tpieces[ind].prix_htva); }
else if (mois>9 && mois <13) { t_res[ind].trim3+=(quant*tpieces[ind].prix_htva);}
} /* boucle for */
return 0;
}
/* ************************************************************************ */
int charger ()
{ int i=0;
int max;
clrscr();
fflush(stdin);
printf(" r‚capitulatif des ventes trimestrielles \n");
printf(" -----------------------------------------------\n");
printf(" nø du produit libelle quantite prix \n");
printf(" ------------------------------------------------------\n");
for (i=1;i<der+1;i++)
{ printf(" %d %s %d %d \n\n",t_res[i].n_pcs,t_res[i].libelle,t_res[i].quantite,t_res[i].prix);
}
printf("\n");
printf(" nø produit 1øtrim 2øtrim 3øtrim 4øtrim \n");
for(i=1;i<der+1;i++)
{
printf(" %d %s %d %d %d %d \n",t_res[i].n_pcs,t_res[i].libelle,t_res[i].trim1,t_res[i].trim2,t_res[i].trim3,t_res[i].trim4);
}
getch();
clrscr();
return 0;
}
int menu()
{ char c=NULL;
struct time heure_actuelle;
gettime(&heure_actuelle);
clrscr();
textcolor(10);
puts(" ------------- MENU ENCODAGE ---------------\n\n\n");
printf(" horloge systeme : %d h %d min %d sec\n\n",heure_actuelle.ti_hour,heure_actuelle.ti_min,heure_actuelle.ti_sec);
while (c!='4')
{
printf(" encoder tableau des pieces [1] \n");
printf(" encoder tableau des produits [2] \n");
printf(" charger les resultats [3] \n");
printf(" quitter [4] \n");
c=toupper(getch());
switch (c)
{ case '1': encode_pieces();break;
case '2':encode_prod(); break;
case '3': charger(); break;
};
}
clrscr();
return 0;
}
int main ()
{ clrscr();
printf(" avant de commencer … encoder voil… quelques petits conseils :\n\n -encode au moins 3 produits \n -retiens les numeros des 3 produits et … quelles produits ils correspondent\n\n\n Voil… c tout, … toi de tester ...\n");
getch();
fflush(stdin);
textcolor(10);
menu();
return 0;
}
Sources du même auteur
Sources de la même categorie
Commentaires et avis
|
Derniers Blogs
TECHDAYS PARIS 2012 : NOUVELLES TENDANCES DU POSTE DE TRAVAIL - BRING YOUR OWN PCTECHDAYS PARIS 2012 : NOUVELLES TENDANCES DU POSTE DE TRAVAIL - BRING YOUR OWN PC par ROMELARD Fabrice
Speakers: Thierry Rapatout, Antoine Petit et Xavier Trebbia Cette session entre dans le cadre des RDV Décideurs des TechDays 2012, elle est liée à la consumérisation de l'IT et la mise en place du "DeskTop as a Service" dans de plus en ...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice TECHDAYS PARIS 2012 : SYSTEM CENTER SERVICE MANAGER 2012 VUE D'ENSEMBLETECHDAYS PARIS 2012 : SYSTEM CENTER SERVICE MANAGER 2012 VUE D'ENSEMBLE par ROMELARD Fabrice
Speakers: Julien Marechal, Gautier Confiant, Sébastien MEYER La session débute par le positionnement de la solution System Center par rapport aux concepts d'organisation ITIL. Le portail du catalogue de se...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice TECHDAYS PARIS 2012 : PLEINIèRE SECOND JOURTECHDAYS PARIS 2012 : PLEINIèRE SECOND JOUR par ROMELARD Fabrice
Après une première journée dédiée aux développeurs, cette seconde journée est dédiée au monde des entreprises et de ses applications. Ainsi, cette pleinière est dédiée à faire un 360 de l'évolution des applications Business aux demandes ac...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice TECHDAYS PARIS 2012 : RETOUR D'EXPéRIENCE SUR LA MISE EN PLACE D'UN CLOUD PRIVéTECHDAYS PARIS 2012 : RETOUR D'EXPéRIENCE SUR LA MISE EN PLACE D'UN CLOUD PRIVé par ROMELARD Fabrice
Speaker : Guillaume Rochette Cette session est dédiée à fournir le retour sur la mise en place d'un cloud privé (IaaS) par Osiatis pour son compte ou celui de ses clients. Ce projet s'est déroulé sur 4 mois et a permis de faire évoluer...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice TECHDAYS PARIS 2012 : COMMENT SHAREPOINT A SAUVé MES TECHDAYSTECHDAYS PARIS 2012 : COMMENT SHAREPOINT A SAUVé MES TECHDAYS par ROMELARD Fabrice
Speakers : Lionel Limozin et Alain Marty La session commence par une découverte de SharePoint à travers la mise en place d'un environnement SharePoint pour la gestion des Sessions animées par BeWise. Le besoin est très ba...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice
Logiciels
Academy System (17.2.1.0)ACADEMY SYSTEM (17.2.1.0)Logiciel de gestion des établissements.
- élèves/étudiants (inscription, dossier, absence...)
-... Cliquez pour télécharger Academy System Easy-Planning (1.0.0.1)EASY-PLANNING (1.0.0.1)Basé sur les mêmes principes que MyPlanning, Easy-Planning permet de créer des plannings sous la ... Cliquez pour télécharger Easy-Planning COLLECTOR PLUS (3.00B)COLLECTOR PLUS (3.00B)COLLECTOR PLUS version 3.00B est un logiciel utilisant une base de données alimentée par :
- L... Cliquez pour télécharger COLLECTOR PLUS PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V7.4)PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V7.4)PONAMEDIA TV DEVIENS HELLLOOO FLASH
LA TV SUR VOTRE ORDINATEUR.
Toute une plateforme Multi... Cliquez pour télécharger PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO LettresFaciles 2011 (8.0.0.1)LETTRESFACILES 2011 (8.0.0.1)LettresFaciles est un logiciel facilitant la création et la rédaction de lettres types.
Son inte... Cliquez pour télécharger LettresFaciles 2011
|