#include <stdio.h> void cube(float* number); int main(void) { float x = 0.0f; printf("> "); scanf("%f", &x); // TODO: Call cube with x by reference... cube(&x); printf("x holds %f\n\n", x); return 0; } // TODO: Define cube function: void cube(float* number) { *number = (*number)*(*number)*(*number); }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter