Created
February 26, 2018 16:29
-
-
Save northofnormal/9e628b24d178e1051e7c1c93c0eb6383 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main (void) { | |
float d; | |
float half, square, cube; | |
printf("Enter a number between 1 and 100: \n"); | |
scanf("%f", &d); | |
half = d/2; | |
square = d*d; | |
cube = d*d*d; | |
printf("\nYour number is %.2f\n", d); | |
printf("\nHalf of that is %.2f\n", half); | |
printf("\nSquare it to get %.2f\n", square); | |
printf("\nCube it to get %.2f\n", cube); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment