By using the + and – operators, we can swap two numbers without using a third variable. Main logic: Program code: Output: Note: also read about Check for palindrome number Follow Me Please follow me to read my latest post on programming and technology if you like my post. https://www.instagram.com/coderz.py/ https://www.facebook.com/coderz.py Rabecca FatimaStaying up to the […]
November 12, 2022 | C++ | No comments
A palindrome number is a number that remains the same when digits are reversed. For example, the number 125521 is a palindrome number, but 1451 is not. Program Logic: First, Declare a variable reverseNum and initialize it with 0. Now, make a while loop till the original number is greater than zero. In every loop, get the last digit […]
November 12, 2022 | C++ | No comments
n1 is compared to n2. If n1 is larger than n2, it is compared to n3. If it is greater than n3 as well, n1 is the max number; otherwise, n3 is the max number. If n1 is not greater than n2, it follows that n2 is greater than n1. After that, n2 is compared to n3. […]
November 11, 2022 | C++ | No comments
A prime number is greater than one and can be divided by one or itself. In other words, prime numbers cannot be divided by anything other than themselves or 1. Prime numbers include 2, 3, 5, 7, 11, 13, 17, 19, 23, etc. Program code: Output: Note: also read about Diamond Pattern Using Numbers Follow Me […]
November 11, 2022 | C++ | No comments
Python is one of the programming languages that has boosted the world of technology to new heights. Python 2 and Python 3 were the two major versions of Python that were introduced to the world. Even though they are both different versions of the same programming language, there are significant differences between the two, and […]
November 11, 2022 | python | No comments
What is Python IDLE? Python IDLE is an acronym that stands for Integrated Development and Learning Environment. is a very simple and sophisticated IDE designed primarily for beginners, and it is highly regarded and recommended for educational purposes due to its simplicity. Features of IDLE: It has the following key features: Syntax highlighting in Python […]
November 8, 2022 | python | No comments
Program code: Output: Note: also read about Floyd’s Triangle Follow Me Please follow me to read my latest post on programming and technology if you like my post. https://www.instagram.com/coderz.py/ https://www.facebook.com/coderz.py Rabecca FatimaStaying up to the mark is what defines me. Hi all! I’m Rabecca Fatima a keen learner, great enthusiast, ready to take new challenges as […]
November 8, 2022 | C++ | No comments
Floyd’s triangle is a triangular array of natural numbers and it is named after Robert Floyd, a renowned computer scientist popularly known for the design of the Floyd–Warshall algorithm. Program code: Output: Note: also read about Pascals triangle. Follow Me Please follow me to read my latest post on programming and technology if you like my post. https://www.instagram.com/coderz.py/ […]
November 8, 2022 | C++ | No comments
Pascals triangle is a triangular array of binomial coefficients. The numbers outside Pascals triangle are all “0”. These “0s” are very important for the triangular pattern to work to form a triangular array. The triangle starts with a number “1” above, and any new number added below the upper number “1” is just the sum […]
November 8, 2022 | C++ | No comments
Python Installation on Windows involves the following steps to set up the Python environment on a Windows system: Go to python.org/download Download the latest release for Python 3.x for 32-bit or 64-bit depending upon your PC. Open Installer and follow these steps: Run Executable Installer: Run the installer. Make sure to check both of the checkboxes at the […]
November 8, 2022 | python | No comments