write a program to find area of triangle with its base and height ( b*h/2)
write a program to calculate simple interest
(i.e P*T*R*/100)
this is computer science
pls ans in Java program
Answers
Answered by
2
Answer:
1.
class area_triangle
{
void main()
{
Scanner sc=new Scanner(System.in)
System.out.println("Enter base and height");
int b=sc.nextInt();
int h=sc.nextInt();
double area=b*h/2;
System.out.println("Area ="+area):
}
}
2.
class Simple_interest
{
void main()
{
Scanner sc=new Scanner(System.in)
System.out.println("Enter P,R,T");
int p=sc.nextInt();
double r=sc.nextDouble();
int t=sc.nextInt();
double SI= p*r*t/100;
System.out.println("Simple interest =" +SI);
}
}
If i anwer is correct make it brainliest.
Ans if any doubt then ank
Similar questions
Science,
4 months ago
Math,
4 months ago
Math,
8 months ago
Physics,
1 year ago
India Languages,
1 year ago