Wisdom Materials
Home
About Us
Our Clients
Careers
Services
Education
Jobs
News
Business
Health
Astrology
Entertainment
RealEstate
Devotion
Contact Us
C Programs
/ Functions for rectangle area and perimeter calulation
Program Name
Write a C Program for Functions for rectangle area and perimeter calulation.
Theory
Rectangle Area Calculation = length * breath Rectangle Perimeter Calculation = 2*(length+breath)
Program Code
Copy Program Code
#include
void rectarea(); void rectperimeter(); void main() { rectarea(); rectperimeter(); } void rectarea() { int l,b; printf("Rectangle Area Calculation\n"); printf("Enter length and breath values"); scanf("%d%d",&l,&b); printf("Area of a Rectangle= %d\n",l*b); } void rectperimeter() { int l,b; printf("Rectangle Perimeter Calculation"); printf("\nEnter length and breath values"); scanf("%d%d",&l,&b); printf("Perimeter of a Rectangle= is %d\n",2*(l+b)); }
Input
Output
Online C Compiler (To copy paste and Run the c program)
Home
Back