• Language

    C

  • Description

    Gets the cube of x

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdio.h>
#include <stdlib.h>

int main (void)
{
    float cube, x;
    printf ("Enter the value of x: ");
    scanf ("%f", &x);
    (void) getchar ();
    cube=x*x*x;
    printf ("Value of cube: %g\n", cube);
    putchar ('\n');
    system ("pause");
    return EXIT_SUCCESS;
}