Problems with solutions on the topics of lessons

 Tasks: Data types, variables and constants Tasks: Ввод с клавиатуры и вывод данных на экран Tasks: Арифметические операции и комбинированные операторы Tasks: Операторы выбора if и else в С Tasks: The switch statement in C ++ Tasks: The for loop in C++ Tasks: Циклы while, do while, nested loops Tasks: Arrays in C++ Tasks: Two-dimensional arrays C ++ Tasks: Functions in C++ Tasks: Pointers C ++ Tasks: A pointer to a pointer to C ++ Tasks: Classes in C ++

Additional collection of problems with solutions

This page contains all of the tasks on the topics lessons, posted on our website. К каждой задаче прилагается наш вариант решения. Постарайтесь всё же решать их самостоятельно и только потом сравнивать наш исходный код со своим. “Хочешь научиться программировать – программируй”!

Больше практических заданий с решениями найдёте here.

Рекомендуем посетить Сайт для юных программистов – где вы найдете уроки по различным языкам программирования (в том числе для детей), 3D-моделированию, Linux и др.

## 32 thoughts on “Tasks and solution. С ”

1. Yuliya says:

lovely Elephants

prb4715 In one Indian village teacher asked the boy Manmohan count the number of elephants in the village. Manmohan counted all the elephants in the village, and he got a two-digit number n. But instead of, to report the answer to the teacher, Manmohan has decided to play a trick bit. For this Manmohan subtracted from the resulting sum the number of its digits, I divide the result by 9 (rejecting at the same fractional part of the result), that number increased to 1, then append to the end of the last digit obtained starting from the result subtracted chislani 10. Then, what happened in the end, he told the teacher.

Despite all the cunning Manmohan, teacher could determine the number of resulting, how many elephants were in the village. Identify it and you.

Input data

Output

Print the number of elephants in the village.

2. Gülizar says: