coderz.py

Keep Coding Keep Cheering!

Pattern Program Using Star

 C++ implementation for pattern printing. Pattern 1: Program code: Output: Pattern 2: Program code: Output: Pattern 3: Program code: Output: Pattern 4: Program code: Output: Note: also read about Sum Of Series 1 + 2 + 4 + 8 + 16 + 32 + . . n Follow Me Please follow me to read my latest […]

November 7, 2022 | C++ | No comments

Sum Of Series 1 + 2 + 4 + 8 + 16 + 32 + . . n

Program code: Output: Main Logic used here: Note: also read about Sum Of Series 1 + 2 + 3 + 4 + 5 + 6 . . . . n 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 5, 2022 | C++ | No comments

Sum Of Series 1 + 1 / 2 ^ 2 +. . . . 1 / n ^ n

A program to compute the sum of a given series 1 + 1/2^2 + 1/3^3 + …..+ 1/n^n. For this, we will be given the value of n, and our task will be to add up each term, beginning with the first, to find the sum of the given series. Program code: Output: Note: also […]

November 5, 2022 | C++ | No comments

Sum Of Series 1 + 2 + 3 + 4 + 5 + 6 . . . . n

The sum of a series consisting of n terms beginning with “1,” is equivalent to the sum of n natural numbers beginning with 1. There are numerous approaches to solving the same problem, but the ones listed below are the most commonly used by coders. Program code: Output: As one can see in the above code, […]

November 5, 2022 | C++ | No comments

Program to Find ASCII Value of a Character

In C++ programming, a character variable stores an ASCII value (an integer number between 0 and 127) rather than the character itself. This is known as the ASCII value. For instance, the ASCII value of ‘A’ is 65. Therefore, to find the ASCII value of the given Character, we make use of the concept of Type-Casting. […]

November 5, 2022 | C++ | No comments

Adding two numbers

Program code: Output: where, int sum=0: A variable can be initialized during the declaration process. This is usually done to ensure that the value to be used in the future is not set to some random value at the start. sum = x + y: The addition operation is performed by this statement. Note: also […]

November 5, 2022 | C++ | No comments

Inline Function in C++

What is the Inline function & why is it used? When the program executes the function call instruction, the CPU saves the memory address of the instruction that follows the function call, copies the function’s arguments to the stack, and transfers control to the specified function. This process can occasionally result in overhead in function […]

October 11, 2022 | C++ | No comments

Syntax and Structure of a C++ Program

A specific template structure is used to write the C++ program. Let us see an example of “Hello World” program. Example: Output: Header Files: The C++ programming language defines several headers, each of which contains information that is either required or useful to your program. The header <iostream>  is required for this program. using namespace […]

September 21, 2022 | C++ | No comments

Advertisement