vera-sherepa231
?>

Сделайте игру на Паскале "Соник" (Игра должна быть цветная) Мне очень нужно сделать эту работу к К/Р

Информатика

Ответы

serov555zaq5

12,25 Кбайт

Объяснение:

1.

V = K * i, где

V - это информационный объём текстового сообщения (размер файла, содержащего сообщение)

K - количество символов в сообщении

i - информационный вес одного символа (число бит, используемых для записи одного символа)

Дано:

K₁ = 34 строки x 64 символа = 2 176 символов

i₁ = 16 бит = 16 / 8 = 2 байта

Найти:

V₁

V₁ = K₁ * i₁ = 2 176 * 2 = 4 352 байта информационный объём текста

2.

V = K * i, где  

V - информационный объём изображения (размер файла, содержащего изображение)

K - количество точек (пикселей)

i - глубина цвета (число бит, используемых для записи цвета одного пикселя)

Дано:

K₂ = 64 x 128 пикселей = 8 192 пикселей

i₂ = 1 байт

Найти:

V₂

V₂ = K₂ * i₂ = 8 192 * 1 = 8 192 байт информационный объём изображения

3.

информационный объем документа = информационный объём текста + информационный объём изображения

Найти:

V

V = V₁ + V₂ = 4 352 + 8 192 = 12 544 байт информационный объем документа

V = 12 544 байт = 12 544 / 1024 = 12,25 Кбайт информационный объем документа

Kochinev7

import java.util.Scanner;

public class TreeStructures {

   static Scanner scnr = new Scanner(System.in);

   static int height;

   public static void main(String[] args) {

       System.out.print("How tall should the top of the tree be? ");

       height = scnr.nextInt();

       System.out.println();

       if (height >= 5 && height <= 20) {

           System.out.println("Flat tree:");

           flatTree();

           System.out.println("Xmas tree:");

           xmasTree();

       } else {

           System.out.println("That's not a valid size. I can only do trees from 5 to 20");

           System.out.println("Quitting now.");

       }

   }

   public static void flatTree() {

       int width = (height * 2) - 1;

       // first for loop to print number of rows

       for (int i = 1; i <= height; i++) {

           // second for loop to print stars to create rectangle

           for (int stars = 1; stars <= width; stars++) {

               System.out.print("*");

           }

           // println to print rows in.

           System.out.println();

       }

       //first for loop to print out rows for the bottom part of tree

       for (int i = 0; i <= height / 5; i++) {

           if (height % 2 == 0) {

               for (int j = 0; j <= ((width) / 3) + 1; j++) {

                   System.out.print("*");

               }

           } else {

               //second for loop to print out width for the bottom part of the tree

               for (int j = 0; j <= (width) / 3; j++) {

                   System.out.print("*");

               }

           }

           System.out.println();

       }

   }

   public static void xmasTree() {

       int width = height * 2 - 1;

       // NESTED LOOPS

       // first for loop to print amount of rows

       for (int i = 0; i < height; i++) {

           // second for loop for print out spaces to match the tree level

           for (int j = 0; j < height - i; j++) {

               System.out.print(" ");

           }

           // third for loop to print out stars

           for (int k = 0; k < (2 * i + 1); k++) {

               System.out.print("*");

           }

           System.out.println();

       }

       // first for loop to determine amount of rows for bottom

       for (int i = 0; i <= height / 5 +1 ; i++) {

               // for loop to print the bottom part of the tree

               for (int j = 0; j <= width/3; j++) {

                   System.out.print(" ");

               }

               for (int j = 0; j <= (width) / 3; j++) {

                   System.out.print("*");

               }

               System.out.println();

       }

   }

}

выход:

Flat tree:

Xmas tree:

         *

        ***

       

     

     

   

   

 

 

     

     

     

     

Объяснение:

Ответить на вопрос

Поделитесь своими знаниями, ответьте на вопрос:

Сделайте игру на Паскале "Соник" (Игра должна быть цветная) Мне очень нужно сделать эту работу к К/Р
Ваше имя (никнейм)*
Email*
Комментарий*

Популярные вопросы в разделе

NarekAlekseevich779
maryariazantseva
rakitinat8
julia3594265843
mariya
garunkhachatryan
mberberoglu17
AHO436
fakelel
annatarabaeva863
александр496
yorestov
iraira761
buslavgroupe
bellatrixstudio