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 и др.

71 thoughts on “Tasks and solution. С

  1. S.O.S.
    program structure. Functions.
    Develop a library of functions to perform operations with binary
    wood. There should be a function of adding a tree node,
    removal unit, search and analysis of the need for balancing.
    Questions and Tasks:
    1.Design an algorithm for solving the problem and write a program in C
    (С ), compile and debug it.
    2. Check the correct operation of the program, ensure stability
    algorithm.
    3. What are the advantages of using shared libraries, how to create and
    to use a shared library. Create a shared library
    written functions.

  2. Level navichok slozhnostash 16
    hairy business
    (Time: 1 sec. Memory: 16 MB complexity: 32%)
    One Neformal fired from his job, and now he had to somehow earn a living. reflection, he decided, that can be very good money by selling your own hair. It is known, that the collection points to buy the hair of any length cost cu. for every centimeter. Since the hair is a very dynamic market, the price of one centimeter of hair changes every day as well as the exchange rate. Neformal is a very good business analyst. He was able to calculate, what will be the price of one centimeter of hair in each of the next N days (for the convenience of the days are numbered in chronological order of 0 to N-1). Now he wants to define, in which of these days he should sell hair, that at the expiration of N days to earn the most money. Note, that hair Neformal only grow and grow on the night 1 centimeter per night. It should also be taken into account, that prior to the 0th day neformal grief cropped haircut and to 0 by day his hair length was 1 centimeter.
    Input data
    The first line INPUT.TXT input file contains the integer N (0 < N ≤ 100). In the second line N set of natural numbers, not exceeding 100, the corresponding value of C[i] 1 centimeter of hair for each i-th day.
    Output
    The output file a single line OUTPUT.TXT need to bring the maximum amount of money, you can earn neformal of N days.
    examples
    № INPUT.TXT

    5
    73 31 96 24 46
    OUTPUT TXT
    380
    ___________________
    INPUT.TXT

    10
    1 2 3 4 5 6 7 8 9 10
    OUTPUT.TXT
    100
    ____-__-____________

    10
    10 9 8 7 6 5 4 3 2 1
    Output
    55

  3. Can someone help)?
    Write a program, implements merge sorting algorithm for double precision real numbers. Necessary, so that the program returns a pointer to a new dynamically created array, containing sorted input sequence.

  4. Нужна помощь
    написать блок схему и программу, определяющую, какое из двух значений сопротивлений R1, R2, R3 можно получить с помощью двух резисторов по 6 кОм
    1. R1=6, R2-10, R3=2
    1. R1=3, R2-5, R3=7
    1. R1=4, R2-12, R3=8

  5. Елементи матриці A[ij]m,n, що дорівнюють нулю поміняти на min
    елемент матриці B[ij]m,n .Задача

  6. Елементи матриці A[ij]m,n, що дорівнюють нулю поміняти на min
    елемент матриці B[ij]m,n .

  7. З введеного списку вивести прізвища із заданою кількістю літер.задача

Leave a Reply

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