C Online Compiler
Example: Sum of Two Float Numbers in C Program
C
C++
C#
Java
Python
PHP
main.c
STDIN
Run
// Sum of Two Float Numbers in C Program #include <stdio.h> int main() { float p, q; printf("Enter two float values::\n\n"); scanf("%f %f", &p, &q); printf("Result:: %f + %f = ", p, q); // calculating sum p = p + q; printf("%f\n", p); return 0; }
5.23 7.29
Output
Clear
ADVERTISEMENTS