#include <bits/stdc++.h>
using namespace std;
int search1(string str) {
for (int i = 0; i < str.size(); i++) {
if (str[i] == 'f') return i;
}
return -1;
int search2(string str) {
for (int i = str.size() - 1; i >= 0; i--) {
int main() {
string str = {};
getline(cin, str);
int a = search1(str);
int b = search2(str);
if (a != -1) {
if (a == b)
cout << a;
else
cout << a << " " << b;
return 0;
#include <bits/stdc++.h>
using namespace std;
int search1(string str) {
for (int i = 0; i < str.size(); i++) {
if (str[i] == 'f') return i;
}
return -1;
}
int search2(string str) {
for (int i = str.size() - 1; i >= 0; i--) {
if (str[i] == 'f') return i;
}
return -1;
}
int main() {
string str = {};
getline(cin, str);
int a = search1(str);
int b = search2(str);
if (a != -1) {
if (a == b)
cout << a;
else
cout << a << " " << b;
}
return 0;
}
#include <math.h>
#include <stdlib.h>
#include <conio.h>
int main() {
double a, b, y;
int x;
a = 6.72f;
b = 4.85f;
printf("vvedite x=");
scanf("%d", &x);
switch (x) {
case 1: y = 1 + sqrt(a + abs(x)); break;
case 7: y = 2 + a*a*x*x + exp(x); break;
case 5: y = x*sqrt(1+b*log(a*a*x)); break;
default:
printf("znachenie x zadano neverno\n");
printf("nagmi Enter\n");
getch();
return 0;
}
printf("x=%2dy=%5.2lf", x, y);
getch();
return 0;
}