The basics of programming in c++ for beginners

Tasks and solution. С

  1. Data types, variables and constants
  2. Ввод с клавиатуры и вывод данных на экран
  3. Арифметические операции и комбинированные операторы
  4. Операторы выбора if и else в С
  5. The switch statement in C ++
  6. The for loop in C++
  7. Циклы while, do while, nested loops
  8. Two-dimensional arrays C ++
  9. Arrays in C++
  10. Functions in C++
  11. Pointers C ++
  12. A pointer to a pointer to C ++
  13. Classes in C ++

Additional collection of problems with solutions

практика программирования, задачи с решением, задачи по программированию с++, задачи по программированию C++

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

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

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

128 thoughts on “Tasks and solution. С

    1. Yes – I like it very much too! Still cool, that tasks are grouped by topic. If you want to solve problems with functions, no need to re-read the content 152 tasks, but you follow the right link and practice without wasting time on unnecessary.

  1. I would expand the list of sections, by which tasks are decomposed… and strong.
    For example, add section “Recursive computation” – recursion is a powerful mechanism, but beginners (and not only) they are afraid of him, do not understand and do not know how.
    From the same interesting sections:
    – Dynamic data structures (where to collect everything related to lists, trees, count, STL and Boost in this part, etc.)

    And some sections can be enlarged on the contrary., so as not to be too small – collect related sections into one:
    -> (The for loop in C++) + (Циклы while, do while, nested loops) = Cycles
    -> (Arrays in C++) + (Two-dimensional arrays C ++) = Arrays

    And if we also remove in the title of each section “С ”, because here the whole site is only C ++, you get a nice compact page.
    You can get a very decent tutorial!

  2. if elements of array B (40) in ascending order then assign to variable X; asssign from 0 to X otherwise

    1. Is it really that bad in Kazakhstan??

      Write the wording what you want, in a form similar to a task, and i will help you.

  3. Create class box, whose constructor is passed three doube values, representing the lengths of the sides of the parallelepiped. The box class must calculate its volume and store the result also in the double type. Include the vol member function in the class(), which will display the volume of any object of type box. Subclass ColorBox, base class gear box, by adding an instance variable, containing, the material of which the box is made (paper or leather). Use constructors with parameters to initialize variables of base and derived classes

Leave a Reply

Your email address will not be published. Required fields are marked *