Skip to content

Commit

Permalink
Create program.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnyKid123 authored Jan 30, 2023
1 parent 17d9607 commit d6bc6d6
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions 2. Programming/1. Data types/Three Latin letters/program.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main()
{
int n;
std::cin >> n;
std::vector<char> letters;
for (int i = 97; i < 97 + n; ++i)
{
letters.push_back(char(i));
}

for (auto a : letters)
{
for (auto b : letters)
{
for (auto c : letters)
{
if (a <= b || b <= c || c <= a)
{
std::cout << a << b << c << std::endl;
}
}
}
}

return 0;
}

0 comments on commit d6bc6d6

Please sign in to comment.