kost32rus
04.11.2020 05:16

С диаграммы Венна сравните окружность и сферу даю 30​


С диаграммы Венна сравните окружность и сферу даю 30​

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
shahanovaoksan
07.02.2020 11:37

ответ: Только не точь в точь, а то за это бан)

#include <iostream>

#include <vector>

#include <cstdint>

using namespace std;  template <class T>

istream& operator>>(istream &in, vector<T> &vec) {   for (auto &it : vec)     in >> it;   return in;

}

template <class T>

ostream& operator<<(ostream &out, vector<T> &vec) {   for (auto &it : vec)     out << it << ' ';   return out;

}  

template <class T, class U>

istream& operator>>(istream &in, pair<T, U> &pair){

  in >> pair.first >> pair.second;   return in;

}  

template <class T, class U>

ostream& operator<<(ostream &out, pair<T, U> &pair) {   out << pair.first << ' ' << pair.second;   return out;

}

signed main(void) {     int32_t n; cin >> n;     vector<vector<int64_t>> a(n, vector<int64_t>(n,-1));      

int64_t x = 0, y = n/2;      

a[x][y] = 1;      

for(int32_t i = 2; i <= n*n; ++i) {        

int _x = x, _y = y;          

if(!x) {              

x =  n-1;          

}else {              

x-=1;        

}          

if(y == n-1){            

y = 0;          

}else {            

y++;          

}          

if(a[x][y] != -1){            

 x= _x, y = _y;              

 while(a[x][y] != -1){                  

 if(x == n-1){                    

  x = 0;                  

  }else{                      

  x++;                  

  }            

 }          

}          

a[x][y] = i;      

}      

for(int32_t i = 0; i < n; ++i){          

cout << a[i] << '\n';      

}      

return 0;  

}

У вас есть 4-ая? Я щас создам вопрос!

Если , оцени)

0,0(0 оценок)
Ответ:
lenok140
26.03.2020 17:31

#include <iostream>

using namespace std;

int main()
{
setlocale(LC_ALL, "Russian");
char key;
int i;
int a[255];
float arifm=0,sum=0,b=0;

cout << "Введите числа от а до б через пробел! (Условие: a < b)"<<endl;

for (i=0; i < 254; i++){
cin >> a[i];

if(i >= 1 && a[i] < a[i-1]){
break;
}
b++;
}

cout << "Получили числа: ";
for (i=0;i < b; i++){
cout << " " << a[i];
sum += a[i];
}
cout << endl<< "Сумма чисел = " << sum << endl;
arifm = sum / (b);
cout << "Среднее арифметическое = " << arifm << endl;
system ("pause");
}

 

Только не дописал выход из цыкла.. сейчас он при нарушение условия а < б
Если надо думаю справитесь с do while 

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