| Автор |
Сообщение |
22.05.2026 10:50:57
Тема: 1 - "Количество цифр" 45480
|
Михаил Долинский
Темы: 2184
Сообщений: 52607
Мой профиль
|
char in_str[256];
unsigned __out __bits(8) res;
void main()
{
int k = 0;
for(int i = 0; in_str[i] != '#'; i++) {
if (in_str[i] >= '0' && in_str[i] <= '9') {
k++;
}
}
res = k;
}
|
22.05.2026 10:51:53
Тема: Re:1 - "Количество цифр" 45480
|
Михаил Долинский
Темы: 2184
Сообщений: 52607
Мой профиль
|
char in_str[256];
unsigned __out __bits(8) res;
void main()
{
int k = 1;
for(int i = 0; in_str[i] != '#'; i++) {
if (in_str[i] >= '0' && in_str[i] <= '9') {
k++;
}
}
res = k;
}
|
22.05.2026 10:52:13
Тема: Re:1 - "Количество цифр" 45480
|
Михаил Долинский
Темы: 2184
Сообщений: 52607
Мой профиль
|
string in_str;
int out res;
void main()
{
int i;
string ch;
res = 0;
for (i = 0; i < len(in_str); i = i + 1)
{
ch = mid(in_str, i, 1);
if (ch == "*")
{
break;
}
if ((ch >= "0") && (ch <= "9"))
{
res = res + 1;
}
}
}
|
22.05.2026 10:52:32
Тема: Re:1 - "Количество цифр" 45480
|
Михаил Долинский
Темы: 2184
Сообщений: 52607
Мой профиль
|
string in_str(db);
int out res(db);
void main()
{
int i;
string ch;
res = 0;
for (i = 0; i < len(in_str); i = i + 1)
{
ch = mid(in_str, i, 1);
if (ch == "*")
{
break;
}
if ((ch >= "0") && (ch <= "9"))
{
res = res + 1;
}
}
}
|
22.05.2026 10:53:19
Тема: Re:1 - "Количество цифр" 45480
|
Михаил Долинский
Темы: 2184
Сообщений: 52607
Мой профиль
|
char in_str[128];
unsigned __out __bits(8) res = 0;
void main()
{
int __bits(16) cnt = 0;
for (int i = 0; in_str[i] != '*'; i++)
{
if (in_str[i] >= '0' && in_str[i] <= '9')
{
cnt++;
}
}
res = cnt;
}
|
22.05.2026 10:57:33
Тема: Re:1 - "Количество цифр" 45480
|
Михаил Долинский
Темы: 2184
Сообщений: 52607
Мой профиль
|
char in_str[128] = "q1w2*231";
unsigned __out __bits(16) res = 0;
void main()
{
int __bits(16) cnt = 0;
for (int i = 0; in_str[i] != '*'; i++)
{
if (in_str[i] >= '0' && in_str[i] <= '9')
{
cnt++;
}
}
res = cnt;
}
|
22.05.2026 10:57:50
Тема: Re:1 - "Количество цифр" 45480
|
Михаил Долинский
Темы: 2184
Сообщений: 52607
Мой профиль
|
char in_str[128];
unsigned __out __bits(1) res;
void main()
{
int __bits(16) cnt = 0;
for (int i = 0; in_str[i] != '*'; i++)
{
if (in_str[i] >= '0' && in_str[i] <= '9')
{
cnt++;
}
}
res = cnt;
}
|
22.05.2026 10:58:12
Тема: Re:1 - "Количество цифр" 45480
|
Михаил Долинский
Темы: 2184
Сообщений: 52607
Мой профиль
|
char in_str[128];
unsigned __out __bits(1) res;
void main()
{
int __bits(16) cnt = 0;
for (int i = 0; in_str[i] != '*'; i++)
{
if (in_str[i] >= '0' && in_str[i] <= '9')
{
cnt++;
}
}
res = cnt;
}
|
22.05.2026 10:58:26
Тема: Re:1 - "Количество цифр" 45480
|
Михаил Долинский
Темы: 2184
Сообщений: 52607
Мой профиль
|
char in_str[128];
unsigned __out __bits(1) res;
void main()
{
int __bits(16) cnt = 0;
for (int i = 0; in_str[i] != '*'; i++)
{
if (in_str[i] >= '0' && in_str[i] <= '9')
{
cnt++;
}
}
res = cnt;
}
|
22.05.2026 10:58:47
Тема: Re:1 - "Количество цифр" 45480
|
Михаил Долинский
Темы: 2184
Сообщений: 52607
Мой профиль
|
char in_str[128];
unsigned __out __bits(16) res;
void main()
{
int __bits(16) cnt = 0;
for (int i = 0; in_str[i] != '*'; i++)
{
if (in_str[i] == '1' || in_str[i] == '2' || in_str[i] == '3' ||
in_str[i] == '4' || in_str[i] == '5' || in_str[i] == '6' ||
in_str[i] == '7' || in_str[i] == '8' || in_str[i] == '9' ||
in_str[i] == '0') cnt++;
}
res = cnt;
}
|
22.05.2026 10:59:02
Тема: Re:1 - "Количество цифр" 45480
|
Михаил Долинский
Темы: 2184
Сообщений: 52607
Мой профиль
|
char in_str[128];
unsigned __out __bits(1) res;
void main()
{
int __bits(16) cnt = 0;
for (int i = 0; in_str[i] != '*'; i++)
{
if (0 <= in_str[i] <= 9)
{
cnt++;
}
}
res = cnt;
}
|
22.05.2026 10:59:16
Тема: Re:1 - "Количество цифр" 45480
|
Михаил Долинский
Темы: 2184
Сообщений: 52607
Мой профиль
|
char in_str[128];
unsigned __out __bits(16) res;
void main()
{
int __bits(16) cnt = 0;
for (int i = 0; in_str[i] != '*'; i++)
{
if (0 <= in_str[i] <= 9)
{
cnt++;
}
}
res = cnt;
}
|
22.05.2026 10:59:34
Тема: Re:1 - "Количество цифр" 45480
|
Михаил Долинский
Темы: 2184
Сообщений: 52607
Мой профиль
|
char in_str[128];
unsigned __out __bits(16) res;
void main()
{
int __bits(16) cnt = 0;
for (int i = 0; in_str[i] != '*'; i++) {
if (in_str[i] == '1' ||
in_str[i] == '2' ||
in_str[i] == '3' ||
in_str[i] == '4' ||
in_str[i] == '5' ||
in_str[i] == '6' ||
in_str[i] == '7' ||
in_str[i] == '8' ||
in_str[i] == '9' ||
in_str[i] == '0' ) cnt++;
}
res = cnt;
}
|
22.05.2026 10:59:52
Тема: Re:1 - "Количество цифр" 45480
|
Михаил Долинский
Темы: 2184
Сообщений: 52607
Мой профиль
|
char in_str[128];
unsigned __out __bits(16) res;
void main()
{
int __bits(16) cnt = 0;
for (int i = 0; in_str[i] != '*'; i++) {
if (in_str[i] == '1' ||
in_str[i] == '2' ||
in_str[i] == '3' ||
in_str[i] == '4' ||
in_str[i] == '5' ||
in_str[i] == '6' ||
in_str[i] == '7' ||
in_str[i] == '8' ||
in_str[i] == '9' ||
in_str[i] == '0' ) cnt++;
}
res = cnt;
}
|
22.05.2026 11:00:09
Тема: Re:1 - "Количество цифр" 45480
|
Михаил Долинский
Темы: 2184
Сообщений: 52607
Мой профиль
|
char in_str[128];
unsigned __out __bits(16) res;
void main()
{
int __bits(16) cnt = 0;
for (int i = 0; in_str[i] != '*'; i++) {
if (in_str[i] == '1' ||
in_str[i] == '2' ||
in_str[i] == '3' ||
in_str[i] == '4' ||
in_str[i] == '5' ||
in_str[i] == '6' ||
in_str[i] == '7' ||
in_str[i] == '8' ||
in_str[i] == '9' ||
in_str[i] == '0' ||) cnt++;
}
res = cnt;
}
|
|
|