C Programming
C Programming

The length and breadth of a rectangle and radius of a circle are input through the keyboard. Write a program to calculate the area and perimeter of the rectangle, and the area and circumference of the circle. #C

The length and breadth of a rectangle and radius of a circle are input through the keyboard. Write a program to calculate the area and perimeter of the rectangle, and the area and circumference of the circle. #C

C Programming
C Programming

 

The length and breadth of a rectangle and radius of a circle are input through the keyboard. Write a program to calculate the area and perimeter of the rectangle, and the area and circumference of the circle. #C

 

#include <stdio.h>

int main()

{

double ract_length , ract_breadth , circle_radius ;
double ract_perimeter , ract_area , circumference , circle_area ;Β 

printf("Input length and breadth of ractangle");

scanf("%d %d", ract_length , ract_breadth );

printf("Input Radius of circle");

scanf("%d", circle_radius );

ract_perimeter = 2 * ( ract_length * ract_breadth );

ract_area = ract_length * ract_breadth ;Β 

circumference = 2 * 3.14 * circle_radius ;Β 

circle_area = 3.14 * circle_radius * circle_radius ;

printf("Perimeter of ractangle is %d" , ract_perimeter );

printf("Area of ractangle is %d" , ract_area );

printf("Circumference is %d" , circumference );

printf("Area of circle is %d" , circle_area );Β 

return 0;

}


 


 

 


 

Thanks for reading this blog. Hope you get satisfied with the blog and definitely this blog must have valued your time and effort of reading.

Take a time to connect our other digital creations such as Instagram , Facebook and Youtube.

 

πŸ§‘β€πŸ’»πŸ§‘β€πŸ’»Β Social MediaΒ LinksΒ ofΒ Tech DCodeΒ :

πŸ‘‰πŸ» YouTube :Β https://www.youtube.com/channel/UCjJnEdeugftBwQ3yMuD4B_A

πŸ‘‰πŸ» Instagram :Β https://www.instagram.com/thetechdcode/

πŸ‘‰πŸ» Facebook Page :Β https://www.facebook.com/thetechdcode

πŸ‘‰πŸ» Twitter :Β https://twitter.com/thetechdcode

πŸ‘‰πŸ» Telegram Channel :Β https://t.me/thetechdcode

πŸ‘‰πŸ» Tech DCode Linktree :Β https://linktr.ee/thetechdcode

πŸ‘‰πŸ» My Personal Handles :Β https://linktr.ee/virtualshivamin

πŸ§‘β€πŸ’»πŸ§‘β€πŸ’»Β Social Media LinksΒ ofΒ SHIVAM SINGHΒ (OWNER) :

πŸ‘‰πŸ» Instagram :Β https://www.instagram.com/virtualshivamin/

πŸ‘‰πŸ» Facebook Page :Β https://www.facebook.com/virtualshivamin/

πŸ‘‰πŸ» Twitter :Β https://twitter.com/virtualshivamin/

πŸ‘‰πŸ» Personal Linktree :Β https://linktr.ee/virtualshivaminΒ 

 

Leave a Reply

Your email address will not be published. Required fields are marked *