Created
June 25, 2017 11:30
-
-
Save Ambratolm/9947c02fe0e50ffe466c58c03829ec17 to your computer and use it in GitHub Desktop.
Ecrire un algorithme qui calcule et affiche la surface et le périmètre d’un rectangle dont on lui donne la longueur et la largeur.
This file contains 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("Surface et périmètre d'un rectangle:\n"); | |
printf("================================\n"); | |
float l,L,S,P; | |
printf("Entrez la largeur : "); | |
scanf("%f",&l); | |
printf("Entrez la longueur : "); | |
scanf("%f",&L); | |
S=l*L; | |
P=2*(l+L); | |
printf("________________________________\n"); | |
printf("La surface est: %f\nLe périmètre est: %f\n", S,P); | |
printf("________________________________\n"); | |
system("pause"); | |
} |
marwa22-ghz
commented
Dec 11, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment