编写程序,实现下面功能:
(1):程序中取两个随机整数,这两个随机整数范围为(10~300);
(2):输出下面两个数的和,其输出格式为:77+224=301
import java.util.Random;
public class Get_random {
public static void main(String[] arg) {
Random random = new Random();
int a = random.nextInt(290)+10;
int b = random.nextInt(290)+10;
int c ;
c= a+b;
System.out.println("a="+a+"\nb="+b+"\nc=" +c);
System.out.printf("%d+%d=%d",a,b,c);
}
}