Program markov; uses crt; var a: string; i,b: integer; begin clrscr; writeln('введите слово '); read(a); b: =length(a); for i: =1 to b do begin if i mod 4 = 0 then begin delete(a,i,1); insert('d',a,i); end else if i mod 2 =0 then begin delete(a,i,1); insert('c',a,i); end; end; writeln(a); readln; end.
Anatolevich-sergeevna
12.10.2020
Static void main(string[] args) { int[] a = new int[10]; int[] b = new int[10]; int oblpl = 0, oblu = 0; for (int i = 1; i < 10; i++) { console.writeline("ukazhite ploshad' " + i); a[i] = int.parse(console.; console.writeline("ukazhite urozhai " + i); b[i] = int.parse(console.; oblu = oblu + a[i] * b[i]; oblpl = oblpl + a[i]; } console.writeline("oblastnaya ploshad' " + oblpl); console.writeline("oblastnaya urozhainost' " + oblu/oblpl); console.readline(); случайно не это?
antonkovalev89
12.10.2020
#include < iostream> using namespace std; int main() { int month, day, total_days; int days_per_month[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; cout < < "\nenter month (1 to 12): "; cin > > month; cout < < "enter day (1 to 31): "; cin > > day; total_days = day; for(int j=0; j< month-1; j++) total_days += days_per_month[j]; cout < < "total days from start of year is: " < < total_days < < endl; cin.get(); cin.get(); return 0; }
Ответить на вопрос
Поделитесь своими знаниями, ответьте на вопрос:
Нужно составить нормальный алгоритм маркова! алфавит abcd. заменить каждый чётный элемент на c и каждый 4ый на d.