C++ Pointers ( Incrementing a variable) | Set 1
School Accuracy: 66.83% Submissions: 7014 Points: 0

Given a pointer to a variable, the task is to complete the function updateVar() which will increment the value of the variable by 10. The function does not returns anything.

Input:
The first line of input contains a single integer T, which denotes the number of testcases. Then T test cases follows. Each test case consists of a single line which contains a single integer A.

Output:
Corresponding to each test case, print in a new line the updated value of A.

User Task:
Since this is a functional problem you don't have to worry about input, you just have to complete the function updateVar().

Constraints:
1 <= T <= 100
1 <= A <= 103

Example:
Input:
4
2
5
9
7

Output:
12
15
19
17

to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.