C Online Compiler
Example: C Program to Find Area of Rectangle
C
C++
C#
Java
Python
PHP
main.c
STDIN
Run
// C Program to Find Area of Rectangle #include <stdio.h> int main() { float length, width, area; printf("Enter the length & width of the rectangle::\n"); scanf("%f", &length); scanf("%f", &width); // It will calculate area of rectangle area = length * width; // It will print the final output printf("\nArea of the rectangle is: %f units\n", area); return 0; }
5 7
Output
Clear
ADVERTISEMENTS