Answers for "int to float conversion in c"

C
5

type change in c

#include <stdio.h>

main() {

   int sum = 17, count = 5;
   double mean;

   mean = (double) sum / count;
   printf("Value of mean : %f\n", mean );
}
Posted by: Guest on May-29-2020
1

int to float c

float percentage;
percentage = (float)number/total * 100;
Posted by: Guest on November-25-2020
0

int to double c

int vIn = 0;
double vOut = (double)vIn;
Posted by: Guest on November-25-2020
-1

c float to int

# you can cast in c like so
float my_float= 1.446;
int my_int = (int) my_float;
Posted by: Guest on May-29-2020

Code answers related to "C"

Browse Popular Code Answers by Language