answersLogoWhite

0

Here's a simple C program to calculate the area of a rectangle:

#include <stdio.h>

int main() {
    float length, width, area;
    printf("Enter length of the rectangle: ");
    scanf("%f", &length);
    printf("Enter width of the rectangle: ");
    scanf("%f", &width);
    area = length * width;
    printf("Area of the rectangle: %.2f\n", area);
    return 0;
}

This program prompts the user to input the length and width, calculates the area, and then displays the result.

User Avatar

AnswerBot

1w ago

What else can I help you with?

Related Questions

What is the area of a rectangle Cm by Cm?

The area of a rectangle is calculated by multiplying its length by its width. If the rectangle measures Cm by Cm, the area would be Cm × Cm, which equals C²m². Therefore, the area of the rectangle is C² square centimeters.


Write a c programme to draw a rainbow?

Write a C program to Draw a RAINBOW and fill the suitable colors ...


Write a C programme to count the number of vowals present in your name?

abhimanyu


How do you write a c program to find area of rectangle using function?

There will be a function in it like this: double RectangleArea (double a, double b) { return a*b; }


Write a programme for substraction of two numbers in c language?

substracion of any two number program in c


How do you write c programme to find proper subset of a given string?

you can use strstr()


Find the dimensions of the rectangle of largest area that can be inscribed in a circle of radius a in C programming?

Find the dimensions of the rectangle of largest area that can be inscribed in a circle of radius a in C programming


Write a c sharp program to find the area of square?

include&lt;stdio.h&gt; #include&lt;conio.h&gt; void main() { int length, breadth, area ; printf("\n Enter the length &amp; breadth of a Rectangle"); scanf("d",&amp;length,&amp;breadth); area=length*breadth; printf("\n Area of the Rectangle=%d",area); getch(); }


Write a C program to find the area and perimeter of you square ii rectangle?

#include&lt;stdio.h&gt; void main() { float length, breadth, area, perimeter; printf("Enter the length &amp; breadth of a Rectangle\n(length breadth): "); scanf("%f %f",&amp;length,&amp;breadth); area=length*breadth; perimeter=2*(length+breadth); printf(" Area of the Rectangle=%0.3f\n",area); printf("Perimeter of the Rectangle=%0.3f\n",perimeter); printf("(Press ENTER to exit.)"); getch(); printf("\n"); }


How do you use this function in c programme?

I don't use that function in C programme.


How do you write a c programme for elecricity bill?

Write your program and if you are having a problem post it here with a description of the problem you are having. What you are asking is for someone to do your homework for you.


Write a c programme to print all the even numbers in descending order?

#include(stdio.h) int main ()