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
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
#include<stdio.h>
# include<conio.h>
int main(){
float l,b,r, ca,cc,ra ,rp;
printf("Enter the length of rectangle:");
scanf("%f",&l);
printf("Enter the breadth of rectangle:");
scanf("%f",&b);
printf("Enter the radius of circle:");
scanf("%f",&r);
ra=l*b;
rp=2*(l+b);
ca=3.14*r*r;
cc=2*3.14*r;
printf("\nThe area of rectangle :%0.2f", ra);
printf("\nThe perimeter of rectangle :%.2f ,rp);
printf("\nThe area of circle:%2f:",ca);
printf("\n The circumference of circle:%.2f",cc);
return 0;
}
output---Enter the length of rectangle:3
Enter the breadth of rectangle:5
Enter the radius of circle:6
The area of rectangle :15.00
The perimeter of rectangle :16.000
The area of circle:113.04000
The circumference of circle:37.68
output--
Temrature of a city in fahrenheit degrees in input through the keyboard. Write a program to convert this temprature into centigrade degrees.
click the below link--
https://allcodescience.blogspot.com/2021/12/temrature-of-city-in-fahrenheit-degrees.html
if the marks obtain by a student in five different subjects are input through the keyboard write a program to find out the aggregate marks and percentage marks obtained by the student. assume that the maximum marks that can be obtained by a student in each subject is 100.
click the below link--
https://allcodescience.blogspot.com/2021/12/if-marks-obtain-by-student-in-five.html
The distance between two cities (in km).is input through the keyboard Write a program to convert to print the distance in meters feet,imches and centimeter.
click the below link--
https://allcodescience.blogspot.com/2021/12/the-distance-between-two-cities-in-kmis.html
Ramesh basic salary is input through the keyword .His dearness allowance is 40% of the basic salary and house rent allowance is 20% of basic salary write a program to calculate his gross salary.
click the below link--
https://allcodescience.blogspot.com/2021/12/ramesh-basic-salary-is-input-through.html
How will learn of c language?
click the below link--
https://allcodescience.blogspot.com/2021/12/how-learn-of-c-language.html
Discrete Mathematical Structure. Set Theory Functions Relations Propositional Logic Predicate Logic Group Theory
click the below link--
https://allcodescience.blogspot.com/2021/12/discrete-mathematical-structure.html
Comments
Post a Comment