Please if you don't know don't answer.
Attachments:
Answers
Answered by
5
HELLO FRIEND!!
Your question is not properly understandable, but let me try it;
It is saying to accept the salvage price, purchase price, years of price, and will calculate the yearly description of value of an item.
If so, here is your program, and I'm using Scanner class:
import java.util.*;
class Description
{
public static void main (String args[])
{
Scanner sc = new Scanner (System.in);
int pprice, sprice, yprice;
double descp;
System.out.print("Enter the purchase price: ");
pprice = sc.nextInt();
System.out.print("Enter the salvage price: ");
sprice = sc.nextInt();
System.out.print("Enter the years of price: ");
yprice = sc.nextInt();
descp = (double) (pprice - sprice)/yprice;
System.out.println("The description is: " + descp);
}
}
Refer to the attachment for the output.
HOPE MY ANSWER IS SATISFACTORY...
THANKS!
Your question is not properly understandable, but let me try it;
It is saying to accept the salvage price, purchase price, years of price, and will calculate the yearly description of value of an item.
If so, here is your program, and I'm using Scanner class:
import java.util.*;
class Description
{
public static void main (String args[])
{
Scanner sc = new Scanner (System.in);
int pprice, sprice, yprice;
double descp;
System.out.print("Enter the purchase price: ");
pprice = sc.nextInt();
System.out.print("Enter the salvage price: ");
sprice = sc.nextInt();
System.out.print("Enter the years of price: ");
yprice = sc.nextInt();
descp = (double) (pprice - sprice)/yprice;
System.out.println("The description is: " + descp);
}
}
Refer to the attachment for the output.
HOPE MY ANSWER IS SATISFACTORY...
THANKS!
Attachments:
Anonymous:
Great One Rajdeep Bhai
Similar questions
English,
8 months ago
Computer Science,
8 months ago
Science,
1 year ago
Math,
1 year ago
Math,
1 year ago