2.
Program num;uses crt;var x,y,i,l:integer;begintextcolor(11);writeln('Введите i: ');readln(i);y:=0;for x:=14 to i do //Вместо 14 можешь вписать любое натуральное число но не больше "i"beginy:=y+x;end;write ('Ответ', y);readln;end.
1 и 3 можешь посмотреть у меня в профиле.
#include <iostream>
using namespace std;
int main() {
long int i, number, square = 0;
jump:
cout << "Input a natural number: ";
cin >> number;
if (number <= 0) {
cout << "Input error! Try again"<< endl;
goto jump;
}
for(i = 1; i <= number; i++)
square += i + i - 1;
cout << "The square of number " << number << " is " << square << endl;
return 0;
}
Извини рисую я очень плохо думаю главное что б ты понял.
можно для начала сам соч?