Save up to 80 % on our JavaScript e-learning courses. Only this week!

# Solved tasks for C++ lessons 1-3

The following exercises will help you put your knowledge of the C++ language to the test. Based off of what you've learned from previous lessons, try to solve them on your own, but know that you could always download the working solutions under the article. Nonetheless, beware that when you view the solution without solving the exercise, you won't learn anything

If you find yourself stuck at some point, you should always try going back to check previous tutorials first and figure the problem out by yourself.

## Easy exercise

Create an application which asks for the user's age and prints: You're `x` years old (where `x` is the entered number).

Application screen sample:

```Console application
25
You are 25 years old.```

## Intermediate exercise

Create an application which asks for an integer and prints its second power (x squared).

Application screen sample:

```Console application
Enter a number, and I'll square it:
64
Result: 4096```

Create an application that takes a circle's radius as the input. Then, print its circumference and its area based on the given number.

Application screen sample:

```Console application
Enter the circle's radius (cm): 12.1
The circle's circumference based on the given radius is: 75.988 cm
The area of the circle is: 459.727 cm^2```

Did you have a problem with anything? Download the sample application below and compare it with your project, you will find the error easily.

Application includes source codes in language C++

Article has been written for you by David Capka
User rating:
No one has rated this quite yet, be the first one!
The author is a programmer, who likes web technologies and being the lead/chief article writer at ICT.social. He shares his knowledge with the community and is always looking to improve. He believes that anyone can do what they set their mind to.
David learned IT at the Unicorn University - a prestigious college providing education on IT and economics.