Computer Science, asked by BlackKnight1204, 1 year ago

pls ans fast ..........

Attachments:

Answers

Answered by sanaawesome
1

class Design

{

int s, double s1;

int sum( int a , int b)

{

for(int i=a; i<=b; i++)

{

if (i%2==0)

{

s=s+i;

}

}

return s;

}

double sum (double a, double b)

{

s1=a+b;

return s1;

}

double mainmethod()

{

Design obj= new Design();

obj.sum(10,15);

obj.sum(9.0,10.0)

}

}

}


BlackKnight1204: which part of question is this
sanaawesome: its the complete program
BlackKnight1204: there are two parts of the question
Similar questions