#include <stdio.h> int main (void) { double Budget, Price; int NumberofBooks; scanf ("%lf %lf", &Budget, &Price); NumberofBooks = (int) (Budget/Price);/*if you remove the parentheses "budget" will become an integer first and the answer may be incorrect*/ printf ("%d", NumberofBooks); return 0; }
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