Data Types In C Programming Practice Questions Set Exercise | Solving All Daty Types Exercises #11
#include<stdio.h>
// Practice Questions Set 2
int main() {
// Que : 1 Find the circumference of a circle by taking the value of r with scanf function
float r;
float pie = 3.14;
printf("enter the value of radius r : ");
scanf("%f",&r);
float c = 2*pie*r;
printf("the circumference is : %f", c);
// Que : 2 Find the area of parallelogram by taking the value of b and h using scanf
int bb,hh;
printf("enter the value of b : ");
scanf("%d",&bb);
printf("enter the value of h : ");
scanf("%d",&hh);
printf(" the area of parallelogram : %d", bb*hh);
// Que : 3 fing the surface area of cuboid by taking the value l,b,h by using scanf function
int l, b,h;
printf("enter the value of l : ");
scanf("%d",&l);
printf("enter the value of b : ");
scanf("%d",&b);
printf("enter the value of h : ");
scanf("%d",&h);
int lb = l*b;
int bh = b*h;
int hl = h*l;
int surfaceArea = 2*(lb+bh+hl);
printf(" the surface area of cuboid : %d", surfaceArea );
// Que : 4 find the volume of a cylinder by taking radius and height using scanf function
float radius, height;
float pie = 3.14;
printf("enter the value of radius radius : ");
scanf("%f",&radius);
printf("enter the value of height height : ");
scanf("%f",&height);
float v = pie*radius*radius*height;
printf("the volume of cylinder is : %f", v);
// Que : 5 find the volume of a cuboid by taking l,b,h with scanf function
int length, breadth,Height;
printf("enter the value of length : ");
scanf("%d",&length);
printf("enter the value of b : ");
scanf("%d",&breadth);
printf("enter the value of h : ");
scanf("%d",&Height);
int volumeCuboid = length*breadth*Height;
printf(" the volume of cuboid : %d", volumeCuboid );
}