Answer to Question #272925 in C for Asjad

Question #272925

Wap to calculate the area and perimeter of swuare

1
Expert's answer
2021-11-29T00:00:27-0500

Source code



#include <stdio.h>


double perimeter(double s){
    return (4*s);
}
int main()
{
    double side;
    printf("\nEnter length of the sides of the square: ");
    scanf("%lf",&side);
    
    printf("\nPerimeter of the square is: %lf",perimeter(side));


    return 0;
}


Output





Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS