Adobe Scan 24-Nov-2023

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

public class EconomyRateCalculator {

public static void main (String[]


args) {
int runsinFirstOver = 6;
int runslnSecondOver = 13 ;
int runsinThirdOver = 4 ;
ir1t runsinFourthOver = 7 ,·

int totalRuns =
runsinFirstOver + runsinSecondOver +
runsinThirdOver + runsinFourthOver;
int totalOvers ~ 4 ;
doub,le ,e,cono,n1yRat,e =
totalRuns / (totalOvers * 1.0 );

System. ,o ut. pri1n.tln ( Econo:my


11

11
Rate: + eco,nomyRate);
}
Economy Rate: 5 . 5
public class SeriesPrinter {
public static void main(String[]
args) {
int n = 1 ;

for (int i= 1; i <= 5; i++)


System.out. print(n + " " );
n=n*i+ 1·,
1 2 9 28 121
public class SeriesPrinter {
public static void main(String[]
args) {
int n = 1 •·
for (int i= 1; i <= 5; i++)
System.out. print(n + " " );
n = n * i + 1 •·
1 2 9 28 121
public class SeriesPrinter {
public static void main(String[]
args) {
int M = s ·
'
for ( int i= 1; i <= M; i++)
int term= 4 * i + 1 '·
System.out. print(term + "
59131721
public class Rectangle ., ....
{
double length, breadth ;
double area, perimeter ;
void getValues ( double len, double bre)
{
length = len ;
breadth = bre ;
}
double calcArea()
{ double ar = length*breadth ;
area= ar;
return ar ;
}
double calcPerimeter()
{
double perm = 2* ( length + breadth) ;
perimeter = perm ;
return perm ;
}
}
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .
- -- . .. . .. . . . ... .

You might also like