17 lines
247 B
C
17 lines
247 B
C
// Casting
|
|
|
|
#include <cs50.h>
|
|
#include <stdio.h>
|
|
|
|
int main(void)
|
|
{
|
|
// Prompt user for x
|
|
int x = get_int("What's x? ");
|
|
|
|
// Prompt user for y
|
|
int y = get_int("What's y? ");
|
|
|
|
// Divide x by y
|
|
printf("%f\n", (float) x / y);
|
|
}
|