1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include <stdio.h> int main(int argc, const char *argv[]) { int a, b; float c, d; a = 13; b = 5; c = a/b; d = (float)a / (float)b; printf("[integers]\t a = %d\t b = %d\n", a, b); printf("[floats]\t c = %f\t d = %f\n", c, d); return 0; }