码迷,mamicode.com
首页 > 其他好文 > 详细

实验2-1-4 计算平均分

时间:2018-09-18 17:13:05      阅读:220      评论:0      收藏:0      [点我收藏+]

标签:str   public   bsp   sys   nbsp   .com   code   col   string   

package com.company;

public class Main {

    public static void main(String[] args) {
    // write your code here
        int x=87;
        int y=72;
        int z=93;
        int avg=(x+y+z)/3;
        System.out.println("math = "+x+", eng = "+y+", comp = "+z+", average = "+avg);
    }
}

 

实验2-1-4 计算平均分

标签:str   public   bsp   sys   nbsp   .com   code   col   string   

原文地址:https://www.cnblogs.com/zhuzehua/p/9669587.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!