Computer Science, asked by itraa2000, 1 year ago

Please if you don't know don't answer.

Attachments:

Answers

Answered by Rajdeep11111
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!
Attachments:

Anonymous: Great One Rajdeep Bhai
Anonymous: AWESOME!!! ^_^
Rajdeep11111: THANKS!
Similar questions