cs50/src1/calculator5.c

17 lines
262 B
C

// Division with ints, demonstrating truncation
#include <cs50.h>
#include <stdio.h>
int main(void)
{
// Prompt user for x
int x = get_int("x: ");
// Prompt user for y
int y = get_int("y: ");
// Divide x by y
printf("%i\n", x / y);
}