Skip to content

Instantly share code, notes, and snippets.

View ExtremeFine21's full-sized avatar

ExtremeFine21

View GitHub Profile
#include <iostream>
using namespace std;
class Fraction
{
int numerator;
int denominator;
public:
void Init(int a, int b)
#include <iostream>
#include <cstring>
using namespace std;
const int SIZE = 10; //размер игрового поля 10х10
//символы, обозначающие состояние клеток
const char EMPTY = '.'; //для пустых клеток без кораблей
const char SHIP = '#'; //обозначает корабль
#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;
struct Student {
char name[100];
int age;
#include <iostream>
#include <cctype>
using namespace std;
int main() {
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
int charCount = 0, lineCount = 0, vowelCount = 0, consonantCount = 0, digitCount = 0;
char ch;
ОБНОВЛЁННЫЙ КОД:
#include <U8g2lib.h>
#include <Wire.h>
U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE);
// Кнопки и буззер
const int btn_prev = 2;
#include <iostream>
#include <string>
using namespace std;
// Task 1
struct Student {
string name; ushort age; float grade;
};
void task1() {
#include <iostream>
using namespace std;
struct WashingMachine {
string brand = "Samsung", color = "White";
float width = 60, length = 60, height = 85;
int power = 2000, spinSpeed = 1200, heatTemp = 90;
};
struct Iron {
#include <iostream>
#include <cstring> // для strcmp та strcpy
using namespace std;
const int SIZE = 5;
struct Student {
char surname[30];
};
/*#include <iostream>
#include <algorithm>
using namespace std;
int main() {
string s;
cin >> s;
if (s.length() == 10 && all_of(s.begin(), s.end(), islower)) {
sort(s.begin(), s.end());
#include <iostream>
#include <cstring>
#include <cctype>
using namespace std;
int countDigits(const char* str) {
int count = 0;
while (*str) count += isdigit(*str++);
return count;
}