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.