циклы

Find the occurrence of a substring in a string in C

Please tell me: there are two arrays of characters that are entered by the user, you need to check them character by characte ... // функция вывода. { index == NULL ? printf("str1 not in str2") : printf("str1 in str2, entry index is: %d", index); }

The editing of the C binary file is looped

You must replace every third number in the binary file with the same number with the opposite sign. The numbers are represent ... double), 1, input_file); } } fclose (input_file); free (filename); system ("pause"); return 0; }

A while loop with a double condition in python

Actually, the problem is the following: when you leave only one of the conditions in the loop, everything works without compl ... о. Число должно быть от 1 до 9 включительно') number = int(input('Введите число: ')) number = number ** 2 print(number)

SetTimeout. How do I do this inside the loop?

<script> var height = window.innerHeight; var width = window.innerWidth; { function change_bg() { var i = 1; // во ... w can I do this? To do this, I need all this function to be inside the loop. But what kind, I can not put. Help me understand

MySQL: why doesn't while or any other loop work

I decided to study MySQL a little bit with MSSQL and immediately came across a problem... Q: Why doesn't it work? SET @coun ... () BEGIN SET @counter = 1; WHILE (@counter < 20) DO SET @counter = @counter + 1; END WHILE; END Where am I stupid?

Why in MySQL (MariaDB) does the loop not work even in the procedure?

2 UPDATE: Something to think about: delimiter ;; drop procedure if exists test2;; create procedure test2() begin select ‘He ... t do it... I ask the moderators and users to help in this matter, and not to give the tag duplicate and set downvote. Please!

Can't find the factorial of a number

I teach Python. I am solving a problem in which I need to allow the user to enter a non-negative integer value, then apply a ... print(fact) Log: File "<ipython-input-7-6d70e7b9ea80>", line 7 print(fact) ^ SyntaxError: invalid syntax

A program that outputs the words of a string in reverse order in C++

I wrote a program that should output the words of the string in reverse order. It runs without errors, gives you a string to ... he length of each word and resets after writing that word. I'm new to programming, if possible, explain it in a simpler way.

Exit the loop by pressing ESC

I want to exit the loop by pressing the ESC key. I try to exit the loop as written here: How to read until ESC button is pres ... lt;< "Нет такой сортировки\n\n"; break;} } } But it doesn't work. How can I make the loop exit work by pressing ESC?

You need to find the arithmetic mean of the numbers

Write a program that reads two numbers a and b from the keyboard, counts and outputs to the console the arithmetic mean of al ... cond_value): if i % 3 == 0: print (i) I wrote this, you still need the program to find environments. arithmetic.

How to replace the while loop. do on repeat. until?

I wrote the solution via while do (working solution), but I need it via repeat until, I wrote it, but it doesn't work. Help m ... ar; x:= xn; repeat y:=x*sin(x); chart1.Series[0].AddY(y); x:= x+h until x<=xk; end;

How to calculate the factorial in c#?

What is the easiest way to calculate the factorial in c#???

Loops on assembler

I tried to write a code whose task sounds like this: find the sum of the numbers of the natural series from 1 to N, which are ... n the link below didn't help me. Https://stackoverflow.com/questions/42188685/implementing-a-flow-1-if-else-if-2-in-assembly

Python. Increment of the counter in the loop

How to increment the counter during the execution of the loop for param in range(len(mass)): if a==b: . . par ... <val;i++) { if (a==b) { ... i+=5; } else ... } But in python, this doesn't work, the counter keeps going no matter what.

draw an isosceles triangle in the opposite direction (the base should lie on the right). use nested loops

I have a piece of code that draws a rectangle with the base on the left, needs to be redone so that the base is on the right ... for (int j = 0; j < h; j++) { cout << "*"; } cout << endl; }

Delphi 7 cycles with a set number of repetitions

How do I write such a program? As far as I understood-it will turn out 2 Begin, and 3 variables that need to be set to the us ... x:=x + h; Writeln ('X=',x, 'Y=',y); Readln; end; end. It turned out like this, but I'm not sure what is correct

The uninitialized char. C++variable is used

#include <iostream> using namespace std; int main() { while (char ch = cin.get() && ch != '=') { ... hrown about the uninitialization of the ch variable. Why is an exception being caught here? ch quite seems to be initialized.

Regularity of the series

Help determine the pattern of the series for the cycle: 3,6,9,13,16,19,23,26,29. You need to solve the problem: http://smotr.im/b5we

Raise a number to a power without using the exponentiation operation, using the for next. VBA loop

Is it possible in VBA to raise a number to a power without using the exponentiation operation, but only using the for next loop? If so, how?

Tasks for cycles [closed]

Closed. It is impossible to give an objective answer to this question . Answers to it are not accepted at the moment. ... I want to practice with loops in java. Please give me some problems.