zoukankan      html  css  js  c++  java
  • 案例一:打印超市的购物小票

    一、题目:用IDEA打印出下列购物小票的信息,并贴出运行结果

      

    二、代码:

     1 package com.sz.zelin;
     2 
     3 //这是注释,此处不执行!!!---这是程序的入口处!!!
     4 
     5 public class Test2 {
     6     public static void main(String[] args) {
     7         System.out.println("    人人乐白金假日购物广场(RenRenLe)     ");
     8         System.out.println("店  号:S131   机号:P026     流水号:244  ");
     9         System.out.println("收银员:0312            日期;2014.12.14  ");
    10         System.out.println("======================================= ");
    11         System.out.println("    商品名     数量      单价      金额  ");
    12         System.out.println("1   小肥羊火锅汤料(清汤) 110g          ");
    13         System.out.println("6935953399984       1   15.80     15.80 ");
    14         System.out.println("            特价商品                    ");
    15         System.out.println("2   海底捞清汤火锅汤料110g               ");
    16         System.out.println("6942032700753       1   17.90     17.90 ");
    17         System.out.println("3   青岛啤酒瓶装600ml                    ");
    18         System.out.println("6923740100059       1    4.50      4.50 ");
    19         System.out.println("4   青岛啤酒瓶装600ml                    ");
    20         System.out.println("6923740100059       1    4.50      4.50 ");
    21         System.out.println("5   青岛啤酒拼装600ml                    ");
    22         System.out.println("6923740100059       1    4.50      4.50 ");
    23         System.out.println("合计                              47.20 ");
    24     }
    25 
    26 }

    三、截图运行结果:

      

  • 相关阅读:
    安装python官方的mysql库“mysql-connector-python”
    ubuntu(Mint-17)修改dns
    Updating Protobuf and GRPC in Golang
    git切换到远程分支
    ubuntu下取代ping的好工具tcpping
    为什么利率上升,债券价格下降?
    关于债券之我的疑惑
    GitHub超详细图文攻略
    git——从远程库克隆
    git——添加远程库
  • 原文地址:https://www.cnblogs.com/evolve/p/11840984.html
Copyright © 2011-2022 走看看