Frororo
15.05.2022 03:00

Нужно написать программу к этой блок схеме.(pascalabc)

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
5757azfffgghhhj
07.01.2022 21:39

#include <iostream>

using namespace std;

int main()

{

   int m, n;

   cin >> m >> n;  // ввод m и n

   int A[m][n];

   // ввод элементов матрицы

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

       for(int j = 0; j < n; j++)

           cin >> A[i][j];

   // решение

   int B[n], t, s;

   for(int j = 0; j < n; j++)

   {

       int i = 1;

       for(i = 1, t = 1, s = A[0][j]; i < m; i++)

           if(A[i][j] < s)

               s = A[i][j];

           else

           {

               t = 0;

               break;

           }

       B[j] = t;    

   }

   // вывод вектора B

   cout << endl;

   for(int j = 0; j < n; j++)

       cout << B[j] << " ";

   return 0;

}

0,0(0 оценок)
Ответ:
Erikalallala
24.12.2021 05:56

QPython+SL4A:

import android

import time

import sys, select, os #for loop exit

#Initiate android-module

droid = android.Android()

#notify me

droid.makeToast("fetching GPS data")

print("start gps-sensor...")

droid.startLocating()

while True:

   #exit loop hook

   if sys.stdin in select.select([sys.stdin], [], [], 0)[0]:

       line = input()

       print("exit endless loop...")

       break

   #wait for location-event

   event = droid.eventWaitFor('location',10000).result

   if event['name'] == "location":

       try:

           #try to get gps location data

           timestamp = repr(event['data']['gps']['time'])

           longitude = repr(event['data']['gps']['longitude'])

           latitude = repr(event['data']['gps']['latitude'])

           altitude = repr(event['data']['gps']['altitude'])

           speed = repr(event['data']['gps']['speed'])

           accuracy = repr(event['data']['gps']['accuracy'])

           loctype = "gps"

       except KeyError:

           #if no gps data, get the network location instead (inaccurate)

           timestamp = repr(event['data']['network']['time'])

           longitude = repr(event['data']['network']['longitude'])

           latitude = repr(event['data']['network']['latitude'])

           altitude = repr(event['data']['network']['altitude'])

           speed = repr(event['data']['network']['speed'])

           accuracy = repr(event['data']['network']['accuracy'])

           loctype = "net"

       data = loctype + ";" + timestamp + ";" + longitude + ";" + latitude + ";" + altitude + ";" + speed + ";" + accuracy

   print(data) #logging

   time.sleep(5) #wait for 5 seconds

print("stop gps-sensor...")

droid.stopLocating()

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