timon040805
28.06.2020 17:56

Информатика 10 класс, tkinter Доска:

import tkinter

SIZE = 600

LEN = 8

master = tkinter.Tk()

canvas = tkinter.Canvas(master, bg='white', height=SIZE, width=SIZE)

k = SIZE / LEN

for i in range(1, LEN):

x = i * k

canvas.create_line((x, 0), (x, SIZE), fill='red')

canvas.create_line((0, x), (SIZE, x), fill='red')

canvas.pack()

master.mainloop()


Информатика 10 класс, tkinter Доска:import tkinterSIZE = 600LEN = 8master = tkinter.Tk()canvas = tki

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
Ученик132312
22.09.2022 14:27

#include <iostream>

int main() {

const int SIZE = 10;

bool isSence = false;

int sum = 0;

int count = 0;

int arr[SIZE];

for (int i = 0; i < SIZE; i++)

{

 arr[i] = rand() % 20 - 10; // "рандомно" заполняем массив от -10 до 10

 std::cout << arr[i] << "\t"; // выводим массив в консоль

 if (arr[i] >= 0)

  isSence = true;

}

for (int i = 0; i < SIZE; i++)

{

 if ((isSence) && (arr[i] > 0))

  sum += arr[i]; //sum = sum + arr[i];

  count++;

}

if (isSence)

 std::cout << "\nсреднее арифметическое положительных чисел = " << double(sum) / count << std::endl; // явное приведение типов

else

 std::cout << "\nВ массиве нету положительных чисел или нету нулей и/или отрицательных чисел" << std::endl;

return 0;

}

0,0(0 оценок)
Ответ:
kondratenkoari1
18.03.2023 06:58

package testStudentCode;

//import java.util.Arrays;

import java.util.Scanner;

public class TestStudentCode {

public static void main(String[] args) {

/* This reads the input provided by user

        * using keyboard

        */

       Scanner scan = new Scanner(System.in);

       System.out.print("a = ?");

       // This method reads the number provided using keyboard

       double a = scan.nextDouble();

       System.out.print("b = ?");

       double b = scan.nextDouble();

       // Closing Scanner after the use

       scan.close();

       System.out.println(a + "x + (" + b + ") = 0");  

       if (a == 0) {

        System.out.println("a = 0");

       } else {

           double x = - b / a;

        System.out.println("x = " + x);

       }

}

}

Объяснение:

как то так

0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota Оформи подписку
logo
Начни делиться знаниями
Вход Регистрация
Что ты хочешь узнать?
Спроси ai-бота