Advertisement
Ewerlost

Lab2_Java

Sep 23rd, 2023 (edited)
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.46 KB | None | 0 0
  1. package com.company;
  2. public class Main {
  3.     public static void main(String[] args) {
  4.         int Price = 14;
  5.         System.out.println("Эта программа выведет таблицу стоимости порций сыра в рублях");
  6.         for (int i = 1; i < 21; i++) {
  7.             System.out.print(Price + " ");
  8.             Price += 14;
  9.             if (i % 5 == 0) {
  10.                 System.out.println();
  11.             }
  12.         }
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement