C examples for Data Type:double
Use a function of your own to cube the value and print it.
#include <stdio.h> double cubed(double n); // prototype declaration for cubed int main(void){ double input;//from w w w .jav a2s . c o m printf("Enter a number to cube: "); scanf("%lf", &input); printf("%.3f cubed is %.3f\n", input, cubed(input)); return 0; } double cubed(double n){ return n * n * n; }