Nastyмняша
10.10.2022 00:30

Алгоритм построения изображения в трехмерной графике включает в себя(Несколько ответов) 1.предварительную подготовку
2.визуализацию
3.работу над композицией
4.создание физической модели

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
Spectator10
20.11.2022 05:20

#include <iostream>

#include <cmath>

#include <vector>

using namespace std;

int main() {

vector<float> coordinates;

string a;

getline(cin, a);

string buffer;

for(int i = 0; i<a.length(); ++i) {

 if(a[i]!=' ') {

  buffer+=a[i];

 } if(a[i]==' '||i==a.length()-1) {

  if(buffer[buffer.length()-1]=='.') {

   buffer+="0";

  }  

  float num = stof(buffer);

  coordinates.push_back(num);

  buffer = "";

 }

}

if(coordinates.size()!=4) {

 cout << "wrong data. example: 1.1 2.2 3.3 4.4";

}

float result;

int temp1, temp2, temp3, temp4;

temp1 = coordinates[0]-coordinates[2];

temp2 = coordinates[1]-coordinates[3];

temp1 = temp1 * temp1;

temp2 = temp2 * temp2;

temp3 = temp1 + temp2;

result = sqrt(temp3);

cout << result;

}

0,0(0 оценок)
Ответ:
domofon98
05.01.2021 03:00

Задание 1

#include <iostream>

using namespace std;

int main() {

int a, b;

cin >> a >> b;

cout << a - b;

}

Задание 2

#include <iostream>

#include <math.h>

using namespace std;

int main() {

int a;

cin >> a;

cout << pow(a, 2) << ' ' << pow(a, 3)<< ' ' << pow(a, 5);

}

Задание 3

#include <iostream>

#include <math.h>

using namespace std;

int main() {

int a;

cin >> a;

cout << "The next number for the number " << a << " is " << a + 1 <<"!\n" <<"The previous number for the number "<< a << " is " << a - 1 <<"!";

}

Задание 4

#include <iostream>

#include <math.h>

using namespace std;

int main() {

int a;

cin >> a;

cout << (3 * pow(a, 3) + 18 * pow(a, 2)) * a + 12 * pow(a, 2) - 5;

}

Задание 5

#include <iostream>

#include <math.h>

using namespace std;

int main() {

int a, b, c;

cin >> a >> b >> c;

cout << a % 7 << "\n" << b % 7 << "\n" << c % 7;

}

Задание 6

#include <iostream>

#include <math.h>

using namespace std;

int main() {

int a, b, c, a1, b1, c1;

cin >> a >> a1 >> b >> b1 >> c >> c1;

cout << a1 % (8 - a) << "\n" << b1 % (8 - b) << "\n" << c1 % (8 - c);

}

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