Computer Science, asked by Anonymous, 1 month ago


 \large \bf \red \bigstar \: quesrion:
See attached attached picture
please don't spam =_=​

Attachments:

Answers

Answered by kumarsantosh38535
1

Answer:

83 (a)

Explanation:

7.3 (b) a number is updated fron

Answered by anindyaadhikari13
5

Required Answer:-

Question:

Write a program to find and display the percentage difference when:

  • A number is updated from 80 to 90.
  • A number is updated from 7.5 to 7.2.

Solution:

Answer to Q1:

public class Percentage {

public static void main(String[] args) {

double a, b, d;

double p;

a=80.0;

b=90.0;

d=b-a;

p=d/a*100;

System.out.println("When number is updated from "+a+" to "+b);

System.out.println("Percentage Increased: "+p+"%\n");

}

}

Answer to Q2:

public class Percentage {

public static void main(String[] args) {

double a, b, d;

double p;

a=7.5;

b=7.2;

d=b-a;

p=d/a*100;

System.out.println("When number is updated from "+a+" to "+b);

System.out.println("Percentage Difference: "+p+"%\n");

}

}

Explanation:

Percentage difference is calculated as,

P = (Difference between two numbers)/(Original Number)*100%

Value of P is the percentage difference. We have assigned the values and stored their difference in another temporary variable. Using the formula given above, percentage difference is calculated.

Refer to the attachment for output.

Attachments:
Similar questions