This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
class Fraction | |
{ | |
int numerator; | |
int denominator; | |
public: | |
void Init(int a, int b) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cstring> | |
using namespace std; | |
const int SIZE = 10; //размер игрового поля 10х10 | |
//символы, обозначающие состояние клеток | |
const char EMPTY = '.'; //для пустых клеток без кораблей | |
const char SHIP = '#'; //обозначает корабль |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <fstream> | |
#include <cstring> | |
using namespace std; | |
struct Student { | |
char name[100]; | |
int age; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ОБНОВЛЁННЫЙ КОД: | |
#include <U8g2lib.h> | |
#include <Wire.h> | |
U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE); | |
// Кнопки и буззер | |
const int btn_prev = 2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
using namespace std; | |
// Task 1 | |
struct Student { | |
string name; ushort age; float grade; | |
}; | |
void task1() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cstring> // для strcmp та strcpy | |
using namespace std; | |
const int SIZE = 5; | |
struct Student { | |
char surname[30]; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*#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()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cstring> | |
#include <cctype> | |
using namespace std; | |
int countDigits(const char* str) { | |
int count = 0; | |
while (*str) count += isdigit(*str++); | |
return count; | |
} |
NewerOlder