C examples for Data Type:int
Finds cube of entered number, create separate function for display
#include <stdio.h> void showCube(double x); int main(void){ double val; /*from ww w .j av a 2s .c o m*/ printf("Enter a floating-point value: "); scanf("%lf", &val); showCube(val); return 0; } void showCube(double x) { printf("The cube of %e is %e.\n", x, x*x*x ); }