Skip to content

Instantly share code, notes, and snippets.

@Ambratolm
Created June 25, 2017 11:20
Show Gist options
  • Save Ambratolm/087492f5fe439045c1c97f795aa05809 to your computer and use it in GitHub Desktop.
Save Ambratolm/087492f5fe439045c1c97f795aa05809 to your computer and use it in GitHub Desktop.
Ecrire un algorithme qui demande de saisir un nombre puis calcule et affiche son cube.
#include<stdio.h>
main()
{
printf("Cube d'un nombre réel:\n");
printf("--------------------------------\n");
float x,X;
printf("Entrez le nombre: ");
scanf("%f",&x);
printf("--------------------------------\n");
X=x*x*x;
printf("Le cube 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