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; | |
const int MAX_LEN = 100; | |
const char* expr; | |
int pos = 0; | |
bool is_digit(char ch); | |
char peek(); |
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; | |
const int MAX_LEN = 100; | |
class Parser { | |
const char* expr; | |
int pos; |
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 <cstdio> | |
#include <cstdlib> | |
// Аналог strlen, считает длину C-строки | |
int my_strlen(const char* str) { | |
int len = 0; | |
while (str[len] != '\0') { | |
++len; | |
} | |
return len; |
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 <cstdio> | |
#include <cctype> | |
bool isVowel(char ch) { | |
if (ch >= 'A' && ch <= 'Z') ch += 'a' - 'A'; | |
return ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u' || | |
ch == 'а' || ch == 'е' || ch == 'є' || ch == 'и' || ch == 'і' || | |
ch == 'ї' || ch == 'о' || ch == 'у' || ch == 'ю' || 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 <iostream> | |
#include <fstream> | |
using namespace std; | |
const int NAME_SIZE = 50; | |
struct Student { | |
char name[NAME_SIZE]; | |
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 <fstream> | |
#include <cctype> | |
using namespace std; | |
bool isVowel(char ch) { | |
ch = tolower(ch); | |
return ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u' || | |
ch == 'а' || ch == 'е' || ch == 'є' || ch == 'и' || 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
1) | |
#include <iostream> | |
using namespace std; | |
struct Student { | |
char* name; | |
unsigned short age; | |
float averageGrade; | |
}; |
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 | |
{ | |
char brand[50]; | |
char color[20]; | |
float width; | |
float length; | |
float height; |
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; | |
int main() { | |
const int n = 5; | |
int A[n], B[n], C[n]; | |
cout << "Enter the elements of array A: "; |
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
1) | |
#include <iostream> | |
int main() { | |
char arr[11]; | |
std::cout << "Введіть рядок з 10 латинських маленьких літер: "; | |
std::cin >> arr; | |
int length = 0; |
NewerOlder