Skip to content

Instantly share code, notes, and snippets.

@ImShizer
Last active June 2, 2022 20:21
Show Gist options
  • Save ImShizer/47f4fda71e6784becad7f9f164a96ea0 to your computer and use it in GitHub Desktop.
Save ImShizer/47f4fda71e6784becad7f9f164a96ea0 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <cmath>
using namespace std;
int main() {
setlocale(0, "ru");
double a;
double b;
// cout << "Enter first number: ";
// cin >> a;
// cout << "Enter second number: ";
// cin >> b;
// cout << "Result: " << -b / a;
// Task 2
// cout << "Enter first number: ";
// cin >> a;
// cout << "Enter second number: ";
// cin >> b;
// cout << "Result: " << pow(a,b);
// Task 3
// cout << "Введите температуру в цельсиях: ";
// cin >> a;
// cout << "Фаренгейт: " << (a * 9/5) + 32 << '\n';
// cout << "Кельвин: " << a + 273.15 << '\n';
// cout << "Реюмер: " << a * 1.25 << '\n';
// cout << "Делиль: " << (100 - a) * 1.5 << '\n';
// Task 4
// Example 1
int c = 1;
int d = 2;
// int e;
// e = d;
// d = c;
// c = e;
// cout << c << ' ' << d << '\n';
// Example 2
swap(c, d);
cout << c << ' ' << d << '\n';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment