for (i = 0; i < kol; i++) {
cout « as[i].punkt_naznachenia « " ";
cout « as[i].nomer_reisa « " ";
cout « as[i].tip_samoleta « endl;
}
char poisk_samoletov[40];
cout « "Punkt naznachenia reisa " « endl;
cin » poisk_samoletov;
bool f = false;
for (i = 0; i < kol; i++)
if (strcmp(as[i].punkt_naznachenia, poisk_samoletov) == 0)
{
cout « "Nomer reisa ";
cout « as[i].nomer_reisa « endl;
cout « "Tip samoleta ";
cout « as[i].tip_samoleta « endl;
f = true;
}
if (!f) {
cout « "Net takogo punkta naznachenia reisa " « endl;
}
system("pause");
}
Объяснение:
# example 1
print("Hello, Amy")
# example 2
age = "15"
print("Amy is {0} years old".format(age))
# example 3
color = input("Input your favorite color: ")
print("Her favorite color is {0}".format(color))
Объяснение:
https://pythonworld.ru/osnovy/formatirovanie-strok-metod-format.html