Some Problems for the beginners in C++
Answer submission procedure
- Create an issue (if want to solve Problem 1 then create an issue as Problem 1 solution) then get assigned by admin (first come first service) and then start solving it
- If question asks for Bug or the what does the program do then edit the readme file and specify the bug like: "### Problem "number" "newline" - Bug1/output "text" "newline" -Bug2/output "text"...."
- If question asks for Bug and correct it, first specify the bug and submit the corrected file name as "Problem number_sol"
- If solving issues then answer in readme file using the discussed convention and then upload the file(if asked)
Example How to specify?
- Bug 1/output
- Bug 2/output
- .
- .
- Bug n/output
- Then upload the file if necessary
- Issue number- answer
- Then upload the file if necessary
- Issue number-13
output will be
Enter number of rows: 5
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
output is called-Pascal's Triangle.
Checking equality without using comparison or arithmetic operator:
- using bitwise XOR
- Rotates the array circular right
-
This program calculates the sum of digits till a single digit is obtained, for ex:
534=> 5+3+4=12
12=> 1+2=3.
So output would be 3.
- Bug 1 => variable 'Test' is not decremented due to which infinite while loop
- Bug 2 => no input for variable 'a' so garbage value is printed
- It is a simple program that swaps the values of 2 variables in a single line.