C++ Examples Uncategorized

WAP in C++ to Print Mystery Series from 1 to 50

The Program in C++ to Print Mystery Series from 1 to 50 is given below:

#include <iostream>

int main() {
    for (int i = 1; i <= 50; i++) {
        std::cout << "Mystery series number " << i << std::endl;
    }
    return 0;
}

Output:

Mystery series number 1
Mystery series number 2
Mystery series number 3
Mystery series number 4
Mystery series number 5
Mystery series number 6
Mystery series number 7
Mystery series number 8
Mystery series number 9
Mystery series number 10
Mystery series number 11
Mystery series number 12
Mystery series number 13
Mystery series number 14
Mystery series number 15
Mystery series number 16
Mystery series number 17
Mystery series number 18
Mystery series number 19
Mystery series number 20
Mystery series number 21
Mystery series number 22
Mystery series number 23
Mystery series number 24
Mystery series number 25
Mystery series number 26
Mystery series number 27
Mystery series number 28
Mystery series number 29
Mystery series number 30
Mystery series number 31
Mystery series number 32
Mystery series number 33
Mystery series number 34
Mystery series number 35
Mystery series number 36
Mystery series number 37
Mystery series number 38
Mystery series number 39
Mystery series number 40
Mystery series number 41
Mystery series number 42
Mystery series number 43
Mystery series number 44
Mystery series number 45
Mystery series number 46
Mystery series number 47
Mystery series number 48
Mystery series number 49
Mystery series number 50

Pro-Tips💡

This program uses a for loop to iterate from 1 to 50, and at each iteration,

it prints “Mystery series number ” followed by the current iteration number.

The std::cout is used to print the output to the console, and std::endl is used to add a new line after each printed number.

The return 0; statement at the end of the main function tells the operating system that the program has successfully executed.

Learn C-Sharp ↗

C-sharp covers every topic to learn about C-Sharp thoroughly.

Learn C Programming ↗

C-Programming covers every topic to learn about C-Sharp thoroughly.

Learn C++ Programming↗

C++ covers every topic to learn about C-Sharp thoroughly.

Codeauri is Code Learning Hub and Community for every Coder to learn Coding by navigating Structurally from Basic Programming to Front-End Development, Back-End Development to Database, and many more.

Related Posts

C# Program to Find Sum of Rows & Columns of a Matrix

The Program in C# Program to Find Sum of Rows & Columns of a Matrix is given below: Output: Hello Codeauri Family,enter the number of rows and columns…

C# Program to Calculate Determinant of Given Matrix

The Program in C# Program to Calculate Determinant of Given Matrix is given below: Output: Hello Codeauri Family, enter the number of rows and columns of the matrix…

C# Program to Find Sum of right Diagonals of a Matrix

The Program in C# Program to Find Sum of right Diagonals of a Matrix is given below: Output: Hello Codeauri Family, enter the number of rows and columns…

C# Program to Find Transpose of Given Matrix

The Program in C# Program to Find Transpose of Given Matrix is given below: Output: Hello Codeauri Family, enter the number of rows and columns in the matrix:22Enter…

C# Program for Multiplication of two square Matrices

The Program in C# Program for Multiplication of two square Matrices is given below: Output: Hello Codeauri Family, enter the number of rows/columns in the matrices:2Enter the elements…

C# Program to Delete Element at Desired position From Array

The Program in C# Program to Delete Element at Desired position From Array is given below: Output: Hello Codeauri Family, enter the number of elements in the array:4Enter…

Leave a Reply

Your email address will not be published. Required fields are marked *

Your Journey into Code Begins Now: Discover the Wonders of Basic Programming

X