diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2023-12-03 05:51:36 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2023-12-03 05:51:36 +0000 |
commit | 6a10c33f6e59de7f02fd6c12bce308d3150c5eeb (patch) | |
tree | c558b480b37a5ae3f648eb4346115ed079678329 /wk1/lect1/calculator.c | |
parent | 2e86106732db92667bd8a64e3f98c1b6e8df86a5 (diff) |
Sat, Dec 2, 2023, 9:51 PM -08:00
Diffstat (limited to 'wk1/lect1/calculator.c')
-rw-r--r-- | wk1/lect1/calculator.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/wk1/lect1/calculator.c b/wk1/lect1/calculator.c new file mode 100644 index 0000000..037436d --- /dev/null +++ b/wk1/lect1/calculator.c @@ -0,0 +1,11 @@ +#include <stdio.h> +#include <cs50.h> + +int main(void) +{ + long x = get_int("x: "); + long y = get_int("y: "); + + double z = (double) x / (double) y; + printf("%.20f\n", z); +} |