1)uses crt; var x,a,b,c,i: integer; begin cls; write('введите число: '); readln(x); a: = x div 100; b: = (x - a*100) div 10; c: = (x - a*100 - b*10); if (a=b) or (a=c) or (b=c) then writeln('есть одинаковые цифры') else writeln('одинаковых цифр нет'); end.2)uses crt; var x: real; begin cls; write('сумма покупки: '); readln(x); if x> 1000 then x: =x-(x*0.1); writeln('стоимость с учётом возможной скидки ',x); end.
1) there are 4 rooms in this house. (подставите количество сами, т.к. не вижу в каком 2)there are 2 bedrooms in this house. 3) there in his living (аналогично на остальные вопросы), т.к. не видно картинки, чтобы вам перечислить,что в зале, в обеденной комнате, ванне, спальне и ученическом столе).
#include <iostream>
using namespace std;
int main()
{
setlocale(LC_ALL, "ru");
int word = 1;
bool newWord = 1;
string text = "Один Два Три";
for (int i = 0; text[i] != '\0'; i++)
{
if (newWord)
{
cout << "Слово - " << word << " Буквы - " << text[i] << " " << text[i + 1];
newWord = 0;
cout << endl;
}
if ((int)text[i] == 32 && (int)text[i + 1] != 32)
{
word++;
newWord = 1;
}
}
return 0;
}
Объяснение: