Skip to content

Instantly share code, notes, and snippets.

View Vinnik67's full-sized avatar
🏠
Working from home

Vinnik67

🏠
Working from home
View GitHub Profile
#include <iostream>
#include <string>
#include <memory>
// Абстрактный продукт
class Transport {
public:
virtual void inputData() = 0;
virtual void deliver() = 0;
virtual ~Transport() {}
#define WIN32_LEAN_AND_MEAN
#include <iostream>
#include <windows.h>
#include <ws2tcpip.h>
#include <string>
#pragma comment (lib, "Ws2_32.lib")
#define DEFAULT_BUFLEN 512
#define DEFAULT_PORT "27015"
@Vinnik67
Vinnik67 / Client.cpp
Created February 26, 2026 17:34
дз от 26.02
#define WIN32_LEAN_AND_MEAN
#include <iostream>
#include <windows.h>
#include <ws2tcpip.h>
#include <string>
#pragma comment (lib, "Ws2_32.lib")
#define DEFAULT_BUFLEN 512
#define DEFAULT_PORT "27015"
@Vinnik67
Vinnik67 / client.cpp
Created February 26, 2026 07:27
work task
#define WIN32_LEAN_AND_MEAN
#include <iostream>
#include <string>
#include <windows.h>
#include <ws2tcpip.h>
using namespace std;
#pragma comment (lib, "Ws2_32.lib")
#include <iostream>
void calculateSums(int matrix[3][4], int rowCount, int colCount, int rowSums[], int colSums[], int& totalSum)
{
totalSum = 0;
for (int i = 0; i < rowCount; ++i)
{
for (int j = 0; j < colCount; ++j)
{
rowSums[i] += matrix[i][j];
#include <iostream>
int main()
{
//1
int n;
std::cout << "Enter number: ";
std::cin >> n;