0% found this document useful (0 votes)
23 views3 pages

Prac 1

The document outlines a practical activity for students to find the volume of a cube, cylinder, or sphere using C programming. It includes objectives, algorithms, flowcharts, program coding, and expected outputs for each shape. The practical emphasizes the use of arithmetic operators and input/output data handling in C language.

Uploaded by

Dark Skies
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views3 pages

Prac 1

The document outlines a practical activity for students to find the volume of a cube, cylinder, or sphere using C programming. It includes objectives, algorithms, flowcharts, program coding, and expected outputs for each shape. The practical emphasizes the use of arithmetic operators and input/output data handling in C language.

Uploaded by

Dark Skies
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Name: Bilal Ahmed Khan Grade: XA

SLO No 9.2.2
SLOs Mapped 8.3.2, 9.1.1,9.1.2,9.1.3,9.1.5,9.2.2,9.2.3,9.2.4
Practical Activity To find the volume of cube, cylinder or sphere
Equipment Computer
Software Dev C++

Practical No 1
Topic 9: Fundamental of input and output data handling in C
Objective:
Students will be able to
● use the arithmetic operators and input output data handling in C language to solve the given
arithmetic problem.

Note: You can use any compiler for program execution.


Fill the sections below as evidence of the practical activity.
Algorithm Flowchart
Cube Cube Cylinder Sphere
Step 1: start
Step 2: input l
Step 3: v=l*l*l
Step 4: print v
Step 5: stop
Cylinder
Step 1: start
Step 2: input h, r
Step 3: v=3.142*r*r*h
Step 4: print v
Step 5: stop

Sphere

1
Computer Science Practical: X

Name: Bilal Ahmed Khan Grade: XA


Step 1: start
Step 2: input r start start start

Step 3: v=(4/3)*3.142*r*r*r
Step 4: print v
Step 5: stop
Input l Input h, r Input r

V=3.142*r*r*h V=(4/3)*3.1428r*r*r
V=l*l*l

print v print v
print v

Stop Stop

Stop

Program Coding
Cube Cylinder Sphere
#include<stdio.h> #include<stdio.h> #include<stdio.h>
int main() int main() int main()
{ { {
float l, v; float h, r, v; float r, v;
printf("Enter length= "); printf("enter height= "); printf("enter radius= ");
scanf("%f", &l); scanf("%f", &h); scanf("%f", &r);
v=l*l*l; printf("enter radius= "); v=(4/3)*3.142*r*r*r;
printf("volume= %f", v); scanf("%f", &r); printf("volume= %f", v);
return 0; v=3.142*r*r*h; return 0;
} printf("volume= %f", v); }
return 0;

2
Computer Science Practical: X

Name: Bilal Ahmed Khan Grade: XA


}
Program Output
Cube

Cylinder

Sphere

You might also like