5/9 will result in integer division, which will = 0
Try 5.0/9.0
instead.
More Related Contents:
- How to count the number of times a while loop is executed
- please help me to find the error in this C code [closed]
- Dynamic Array of strings [closed]
- Using the pow() function with integers in C
- C: Reading strings from binary file
- Why is scanf() causing infinite loop in this code?
- Difference between passing array and array pointer into function in C
- Why dividing two integers doesn’t get a float? [duplicate]
- Passing a structure through Sockets in C
- Why does the arrow (->) operator in C exist?
- Hexadecimal string to byte array in C
- C – why is strcpy() necessary
- How to implement Server Name Indication (SNI)
- Using pointer after free()
- Padding in structures in C
- What is the advantage of GCC’s __builtin_expect in if else statements?
- How to convert string to float?
- Variable definition inside switch statement
- How can I create a Makefile for C projects with SRC, OBJ, and BIN subdirectories?
- Timeout Function
- warning: return type defaults to ‘int’ [-Wreturn-type]
- Spaces inserted by the C preprocessor
- What is the difference between signed and unsigned int
- How do you do exponentiation in C?
- signed and unsigned arithmetic implementation on x86
- What is the difference between a Linux platform driver and normal device driver?
- Checking if a dir. entry returned by readdir is a directory, link or file. dent->d_type isn’t showing the type
- C string append
- Why does malloc allocate a different number of bytes than requested?
- Turbo C++: Why does printf print expected values, when no variables are passed to it?