Answers for "integer divide into float c"

C
0

C program for float division of numbers

#include <stdio.h>

void main() {
    int a;
    float b, c, d;
    a = 750;
    b = a / 350;
    c = 750;
    d = c / 350;
    printf("%.2f %.2f", b, d);
    // output: 2.00 2.14
  
}
Posted by: Guest on July-28-2021

Code answers related to "C"

Browse Popular Code Answers by Language