import java.text.NumberFormat;

public class 百分比 {
public static void main(String[] args) {
int completed=30;
int total=541;
double percentage=((double) completed/(double) total)*100;
NumberFormat numberFormat=NumberFormat.getPercentInstance();
numberFormat.setMinimumFractionDigits(2);
String result=numberFormat.format(((double)completed)/((double)total));
System.out.println(result);
}
}

相关文章:

  • 2022-02-01
  • 2022-12-23
  • 2021-05-20
  • 2022-12-23
  • 2022-01-26
  • 2021-12-25
  • 2021-12-19
  • 2021-12-28
猜你喜欢
  • 2022-12-23
  • 2021-11-16
  • 2022-12-23
  • 2022-01-03
  • 2021-07-13
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案