Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- main()
- {
- int A,B,C,produit,somme,pg,pp,fact,i;
- printf("donnez 1er entier:\t");
- scanf("%d",&A);
- printf("donnez 2eme entier:\t");
- scanf("%d",&B);
- printf("donnez 3eme entier:\t");
- scanf("%d",&C);
- somme=A+B+C;
- produit=A*B*C;
- printf("\nla somme des %d %d et %d est:\t%d",A,B,C,somme);
- printf("\nle produit des %d %d et %d est:\t%d",A,B,C,produit);
- if (B<A){
- if(C<A){
- pg=A;
- }else{
- pg=C;
- }
- }else{
- if (C<B){
- pg=B;
- }else{
- pg=C;
- }
- }
- printf("\nle plus grand est:\t%d",pg);
- if (A<B){
- if(A<C){
- pp=A;
- }else{
- pp=C;
- }
- }else{
- if (B<C){
- pp=B;
- }else{
- pp=C;
- }
- }
- printf("\nle plus petit est:\t%d",pp);
- fact=1;
- for (i=1 ; i<=A ; i++)
- {
- fact=fact*i;
- }
- printf("\nfactorielle de %d est:\t %d",A,fact);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement