Last active
June 25, 2017 11:17
-
-
Save Ambratolm/eeb5e267a95cd365b8c4b8ecea9f2535 to your computer and use it in GitHub Desktop.
Ecrire un algorithme qui demande de saisir un nombre puis calcule et affiche son carré.
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("Carré d'un nombre réel:\n"); | |
printf("--------------------------------\n"); | |
float x,X; | |
printf("Entrez le nombre: "); | |
scanf("%f",&x); | |
printf("--------------------------------\n"); | |
X=x*x; | |
printf("Le carré de %f est: %f\n", x,X); | |
printf("--------------------------------\n"); | |
system("pause"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment