Computer Project ICSE
Computer Project ICSE
TOPIC : PROGRAM’S
ID.NO : EM -122
CLASS : IX
SEC :G
SUB : COMPUTER
SUBMITTED ON : /02/2020
1. Program to print te sum of three given numbers 1221, 2332, 3443.
=>
public class Test
{
void myMethod()
{
int num1,num2, num3, sum;
num1 = 1221 ;
num2 = 2332 ;
num3 = 3443 ;
sum = num1 + num2 + num3 ;
System.out.println ("3 given number are: ");
System.out.println (num1);
System.out.println (num2);
System.out.println (num3);
System.out.println ("Sum ="+ sum);
}
}
OUTPUT PRODUCED IS : -
3 given number are :
1221
2332
3443
Sum =6996
2. Program to calculate area of a sphere with radius 7 cm.
=>
class Volume_SurfaceArea
{
void calcArea ()
{
int r = 7 ;
double area , volume , pi = 3.14159 ;
System.out.println (" Radius of sphere : " + r);
area = 4 * pi * r * r ;
System.out.println (" Surface Area of sphere : " + area ) ;
}
}
OUTPUT PRODUCED IS : -
Radius of sphere : 7
Surface Area of sphere : 615.75164
OUTPUT PRODUCED IS : -
The cube of 7.5 is 421.875
OUTPUT PRODUCED IS : -
OUTPUT PRODUCED IS : -
Enter radius : 5
Perimeter of circle is 31.41592653589793